pub enum Key {
Char(char),
Enter,
Up,
Down,
Space,
Esc,
Unknown,
}Expand description
A normalized key press that the prompts understand.
Variants§
Char(char)
A printable character, e.g. 'y'.
Enter
Enter / return key.
Up
Up arrow.
Down
Down arrow.
Space
Space bar.
Esc
Escape key (cancels a selection).
Unknown
Any other key we intentionally ignore.
Trait Implementations§
impl Copy for Key
impl Eq for Key
impl StructuralPartialEq for Key
Auto Trait Implementations§
impl Forget for Key
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