pub enum KeyCode {
Char(char),
Up,
Down,
Left,
Right,
Enter,
}
Expand description
A key from the keyboard.
Variants§
Char(char)
A normal character key, such as a letter, number, or special symbol.
Up
The up arrow key.
Down
The down arrow key.
Left
The left arrow key.
Right
The right arrow key.
Enter
Either enter/return key.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for KeyCode
impl<'de> Deserialize<'de> for KeyCode
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Copy for KeyCode
impl Eq for KeyCode
impl StructuralPartialEq for KeyCode
Auto Trait Implementations§
impl Freeze for KeyCode
impl RefUnwindSafe for KeyCode
impl Send for KeyCode
impl Sync for KeyCode
impl Unpin for KeyCode
impl UnwindSafe for KeyCode
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