#[non_exhaustive]pub struct KeyEvent {
pub code: KeyCode,
pub modifiers: Modifiers,
pub kind: KeyKind,
pub state: KeyEventState,
}Expand description
One normalized key event.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.code: KeyCode§modifiers: Modifiers§kind: KeyKind§state: KeyEventStateImplementations§
Source§impl KeyEvent
impl KeyEvent
pub const fn with_modifiers(self, modifiers: Modifiers) -> Self
pub const fn with_kind(self, kind: KeyKind) -> Self
pub const fn with_state(self, state: KeyEventState) -> Self
Trait Implementations§
impl Copy for KeyEvent
impl Eq for KeyEvent
impl StructuralPartialEq for KeyEvent
Auto Trait Implementations§
impl Freeze for KeyEvent
impl RefUnwindSafe for KeyEvent
impl Send for KeyEvent
impl Sync for KeyEvent
impl Unpin for KeyEvent
impl UnsafeUnpin for KeyEvent
impl UnwindSafe for KeyEvent
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