pub enum NewPressedKey<R> {
Key(R),
NoOp,
}Expand description
Newtype for invoking new_pressed_key on the key for the given ref.
Variants§
Key(R)
Invoke new_pressed_key on the key at the given ref.
NoOp
For keys which do nothing when pressed.
Implementations§
Source§impl<R> NewPressedKey<R>
impl<R> NewPressedKey<R>
Sourcepub fn key(key_ref: R) -> NewPressedKey<R>
pub fn key(key_ref: R) -> NewPressedKey<R>
Constructs a NewPressedKey value.
Sourcepub fn no_op() -> NewPressedKey<R>
pub fn no_op() -> NewPressedKey<R>
Constructs a NoOp NewPressedKey value.
Sourcepub fn map<TR>(self, f: fn(R) -> TR) -> NewPressedKey<TR>
pub fn map<TR>(self, f: fn(R) -> TR) -> NewPressedKey<TR>
Maps the NewPressedKey into a new type.
Trait Implementations§
Source§impl<R> Debug for NewPressedKey<R>where
R: Debug,
impl<R> Debug for NewPressedKey<R>where
R: Debug,
Source§impl<R> PartialEq for NewPressedKey<R>where
R: PartialEq,
impl<R> PartialEq for NewPressedKey<R>where
R: PartialEq,
Source§fn eq(&self, other: &NewPressedKey<R>) -> bool
fn eq(&self, other: &NewPressedKey<R>) -> bool
Tests for
self and other values to be equal, and is used by ==.impl<R> StructuralPartialEq for NewPressedKey<R>
Auto Trait Implementations§
impl<R> Freeze for NewPressedKey<R>where
R: Freeze,
impl<R> RefUnwindSafe for NewPressedKey<R>where
R: RefUnwindSafe,
impl<R> Send for NewPressedKey<R>where
R: Send,
impl<R> Sync for NewPressedKey<R>where
R: Sync,
impl<R> Unpin for NewPressedKey<R>where
R: Unpin,
impl<R> UnsafeUnpin for NewPressedKey<R>where
R: UnsafeUnpin,
impl<R> UnwindSafe for NewPressedKey<R>where
R: 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