Struct EventContext

struct EventContext<'r> { ... }

Give access to user input.

Implementations

impl<'r> EventContext<'r>

fn mode(self: &Self) -> EditMode

emacs or vi mode

fn input_mode(self: &Self) -> InputMode

vi input mode

fn has_hint(self: &Self) -> bool

Returns true if there is a hint displayed.

fn hint_text(self: &Self) -> Option<&str>

Returns the hint text that is shown after the current cursor position.

fn line(self: &Self) -> &str

currently edited line

fn pos(self: &Self) -> usize

Current cursor position (byte position)

impl<'r> Freeze for EventContext<'r>

impl<'r> RefUnwindSafe for EventContext<'r>

impl<'r> Send for EventContext<'r>

impl<'r> Sync for EventContext<'r>

impl<'r> Unpin for EventContext<'r>

impl<'r> UnsafeUnpin for EventContext<'r>

impl<'r> UnwindSafe for EventContext<'r>

impl<T> Any for EventContext<'r>

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for EventContext<'r>

fn borrow(self: &Self) -> &T

impl<T> BorrowMut for EventContext<'r>

fn borrow_mut(self: &mut Self) -> &mut T

impl<T> From for EventContext<'r>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T, U> Into for EventContext<'r>

fn into(self: Self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom for EventContext<'r>

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

impl<T, U> TryInto for EventContext<'r>

fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>