pub enum PressedKeyResult<PKS, KS> {
Pending(KeyPath, PKS),
Resolved(KS),
}
Expand description
Pressed Key which may be pending, or a resolved key state.
Variants§
Pending(KeyPath, PKS)
Unresolved key state. (e.g. tap-hold or chorded keys when first pressed).
Resolved(KS)
Resolved key state.
Implementations§
Source§impl<PKS, KS> PressedKeyResult<PKS, KS>
impl<PKS, KS> PressedKeyResult<PKS, KS>
Sourcepub fn unwrap_resolved(self) -> KS
pub fn unwrap_resolved(self) -> KS
Returns the Resolved variant, or else panics.
Sourcepub fn add_path_item(self, item: u16) -> Self
pub fn add_path_item(self, item: u16) -> Self
Adds an item to the KeyPath if the pressed key result is pending.
Auto Trait Implementations§
impl<PKS, KS> Freeze for PressedKeyResult<PKS, KS>
impl<PKS, KS> RefUnwindSafe for PressedKeyResult<PKS, KS>where
PKS: RefUnwindSafe,
KS: RefUnwindSafe,
impl<PKS, KS> Send for PressedKeyResult<PKS, KS>
impl<PKS, KS> Sync for PressedKeyResult<PKS, KS>
impl<PKS, KS> Unpin for PressedKeyResult<PKS, KS>
impl<PKS, KS> UnwindSafe for PressedKeyResult<PKS, KS>where
PKS: UnwindSafe,
KS: 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