pub struct System<R: Copy + Debug + PartialEq, ModifierKeys: Index<usize, Output = ModifierKey>, LayeredKeys: Index<usize, Output = LayeredKey<R>>> { /* private fields */ }
Expand description
The key::System implementation for layer system keys.
Implementations§
Trait Implementations§
Source§impl<R: Clone + Copy + Debug + PartialEq, ModifierKeys: Clone + Index<usize, Output = ModifierKey>, LayeredKeys: Clone + Index<usize, Output = LayeredKey<R>>> Clone for System<R, ModifierKeys, LayeredKeys>
impl<R: Clone + Copy + Debug + PartialEq, ModifierKeys: Clone + Index<usize, Output = ModifierKey>, LayeredKeys: Clone + Index<usize, Output = LayeredKey<R>>> Clone for System<R, ModifierKeys, LayeredKeys>
Source§impl<R: Debug + Copy + Debug + PartialEq, ModifierKeys: Debug + Index<usize, Output = ModifierKey>, LayeredKeys: Debug + Index<usize, Output = LayeredKey<R>>> Debug for System<R, ModifierKeys, LayeredKeys>
impl<R: Debug + Copy + Debug + PartialEq, ModifierKeys: Debug + Index<usize, Output = ModifierKey>, LayeredKeys: Debug + Index<usize, Output = LayeredKey<R>>> Debug for System<R, ModifierKeys, LayeredKeys>
Source§impl<R: PartialEq + Copy + Debug + PartialEq, ModifierKeys: PartialEq + Index<usize, Output = ModifierKey>, LayeredKeys: PartialEq + Index<usize, Output = LayeredKey<R>>> PartialEq for System<R, ModifierKeys, LayeredKeys>
impl<R: PartialEq + Copy + Debug + PartialEq, ModifierKeys: PartialEq + Index<usize, Output = ModifierKey>, LayeredKeys: PartialEq + Index<usize, Output = LayeredKey<R>>> PartialEq for System<R, ModifierKeys, LayeredKeys>
Source§impl<R: Copy + Debug + PartialEq, ModifierKeys: Debug + Index<usize, Output = ModifierKey>, LayeredKeys: Debug + Index<usize, Output = LayeredKey<R>>> System<R> for System<R, ModifierKeys, LayeredKeys>
impl<R: Copy + Debug + PartialEq, ModifierKeys: Debug + Index<usize, Output = ModifierKey>, LayeredKeys: Debug + Index<usize, Output = LayeredKey<R>>> System<R> for System<R, ModifierKeys, LayeredKeys>
Source§type Context = Context
type Context = Context
The associated Context is used to provide state that
may affect behaviour when pressing the key.
(e.g. the behaviour of layered::LayeredKey depends on which
layers are active in layered::Context).
Source§type Event = LayerEvent
type Event = LayerEvent
The associated
Event
is to be handled by the associated Context,
pending key states, and key states.Source§type PendingKeyState = PendingKeyState
type PendingKeyState = PendingKeyState
Associated pending key state.
Source§type KeyState = ModifierKeyState
type KeyState = ModifierKeyState
Associated key state type.
Source§fn new_pressed_key(
&self,
keymap_index: u16,
context: &Self::Context,
key_ref: Ref,
) -> (PressedKeyResult<R, Self::PendingKeyState, Self::KeyState>, KeyEvents<Self::Event>)
fn new_pressed_key( &self, keymap_index: u16, context: &Self::Context, key_ref: Ref, ) -> (PressedKeyResult<R, Self::PendingKeyState, Self::KeyState>, KeyEvents<Self::Event>)
Produces a pressed key value, and may
yield some ScheduledEvents.
(e.g. tap_hold::Key schedules a tap_hold::Event::TapHoldTimeout
so that holding the key resolves as a hold).
Source§fn update_pending_state(
&self,
_pending_state: &mut Self::PendingKeyState,
_keymap_index: u16,
_context: &Self::Context,
_key_ref: Ref,
_event: Event<Self::Event>,
) -> (Option<NewPressedKey<R>>, KeyEvents<Self::Event>)
fn update_pending_state( &self, _pending_state: &mut Self::PendingKeyState, _keymap_index: u16, _context: &Self::Context, _key_ref: Ref, _event: Event<Self::Event>, ) -> (Option<NewPressedKey<R>>, KeyEvents<Self::Event>)
Update the given pending key state with the given impl.
impl<R: Copy + Copy + Debug + PartialEq, ModifierKeys: Copy + Index<usize, Output = ModifierKey>, LayeredKeys: Copy + Index<usize, Output = LayeredKey<R>>> Copy for System<R, ModifierKeys, LayeredKeys>
impl<R: Copy + Debug + PartialEq, ModifierKeys: Index<usize, Output = ModifierKey>, LayeredKeys: Index<usize, Output = LayeredKey<R>>> StructuralPartialEq for System<R, ModifierKeys, LayeredKeys>
Auto Trait Implementations§
impl<R, ModifierKeys, LayeredKeys> Freeze for System<R, ModifierKeys, LayeredKeys>
impl<R, ModifierKeys, LayeredKeys> RefUnwindSafe for System<R, ModifierKeys, LayeredKeys>where
ModifierKeys: RefUnwindSafe,
LayeredKeys: RefUnwindSafe,
impl<R, ModifierKeys, LayeredKeys> Send for System<R, ModifierKeys, LayeredKeys>
impl<R, ModifierKeys, LayeredKeys> Sync for System<R, ModifierKeys, LayeredKeys>
impl<R, ModifierKeys, LayeredKeys> Unpin for System<R, ModifierKeys, LayeredKeys>
impl<R, ModifierKeys, LayeredKeys> UnwindSafe for System<R, ModifierKeys, LayeredKeys>where
ModifierKeys: UnwindSafe,
LayeredKeys: UnwindSafe,
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