pub struct Context {
pub config: Config,
/* private fields */
}
Expand description
Chord definitions.
Fields§
§config: Config
The config used by the context.
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_indices(
&self,
indices: &[u16],
) -> Vec<ChordIndices, { MAX_CHORDS }>
pub fn chords_for_indices( &self, indices: &[u16], ) -> Vec<ChordIndices, { MAX_CHORDS }>
Returns the chord indices for the given pressed indices.
The returned vec is empty if any of the indices are not part of a chord.
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