pub struct Context { /* private fields */ }
Expand description
Chord definitions.
Implementations§
Source§impl Context
impl Context
Sourcepub const fn from_config(config: Config) -> Context
pub const fn from_config(config: Config) -> Context
Constructs a context from the given config
Sourcepub fn chords_for_keymap_index(
&self,
keymap_index: u16,
) -> Vec<ChordState, { MAX_CHORDS }>
pub fn chords_for_keymap_index( &self, keymap_index: u16, ) -> Vec<ChordState, { MAX_CHORDS }>
Returns the chords for the given keymap index.
- If a chord with that index is resolved as active, return a vec with only that chord.
- Otherwise, return a vec with all the chords which include the keymap index and could be satisfied. (i.e. chords which do not overlap with resolved active chords).
Sourcepub fn handle_event(&mut self, event: Event<Event>)
pub fn handle_event(&mut self, event: Event<Event>)
Updates the context for the given key event.
Trait Implementations§
impl Copy for Context
impl StructuralPartialEq for Context
Auto Trait Implementations§
impl Freeze for Context
impl RefUnwindSafe for Context
impl Send for Context
impl Sync for Context
impl Unpin for Context
impl UnwindSafe for Context
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more