Skip to main content

InputKeyState

Trait InputKeyState 

Source
pub trait InputKeyState<Key, C: InputKeyClass<Key>>: InputState {
    // Provided methods
    fn event(&mut self, event: &EdgeEvent<Key, C>, key: &Key) { ... }
    fn get_cursor_indicator(&self) -> Option<char> { ... }
}
Expand description

Trait for context objects used within ModalMachine.

Provided Methods§

Source

fn event(&mut self, event: &EdgeEvent<Key, C>, key: &Key)

Update the context as needed after a Key has matched an EdgeEvent.

Source

fn get_cursor_indicator(&self) -> Option<char>

Return a character to show at the current cursor position.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<Key: InputKey, Class: InputKeyClass<Key>> InputKeyState<Key, Class> for EmptyKeyState