#[non_exhaustive]pub enum Key {
}Expand description
A keyboard key
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Char(char)
Function(u8)
A function key, like F1 or F5
Left
Left arrow
Right
Right arrow
Up
Up arrow
Down
Down arrow
PageUp
Page up
PageDown
Page down
Home
Home
End
End
Insert
Insert
Enter
Enter
Delete
Delete
Backspace
Backspace
Escape
Escape
Tab
Tab
Implementations§
source§impl Key
impl Key
pub const fn is_char(&self, ch: char) -> bool
pub fn to_ascii_uppercase(&self) -> Option<Self>
pub fn to_ascii_lowercase(&self) -> Option<Self>
pub const fn is_ascii_uppercase(&self) -> bool
pub const fn is_ascii_lowercase(&self) -> bool
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 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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)