pub struct Key {
pub code: u32,
pub character: Option<char>,
}Expand description
One key, identified by a USB HID-ish code (engines map this to
their platform’s keycode space) and an optional UTF-32 character.
character is None for non-printable keys like Backspace.
For typed text, code is the printable character’s value and
character carries the same char; the engine can choose which
to read.
Fields§
§code: u32§character: Option<char>Trait Implementations§
impl Copy for Key
impl Eq for Key
impl StructuralPartialEq for Key
Auto Trait Implementations§
impl Freeze for Key
impl RefUnwindSafe for Key
impl Send for Key
impl Sync for Key
impl Unpin for Key
impl UnsafeUnpin for Key
impl UnwindSafe for Key
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