#[non_exhaustive]pub enum Key {
}Expand description
One logical key, independent of any terminal library’s own enum.
#[non_exhaustive] so a future key (e.g. a specific F-key past F(12),
or a media key) can be added without breaking a downstream match.
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)
A printable character (already case-correct — Shift is folded in
by the translator, not carried as a separate modifier for letters).
Enter
Enter/Return.
Escape
Escape.
Backspace
Backspace.
Delete
Delete (forward-delete).
Tab
Tab.
BackTab
Shift+Tab.
Left
Left arrow.
Right
Right arrow.
Up
Up arrow.
Down
Down arrow.
Home
Home.
End
End.
PageUp
Page Up.
PageDown
Page Down.
F(u8)
A function key, F(1)..=F(12).
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.