pub enum GameKey {
Char(char),
Enter,
Backspace,
Esc,
CtrlC,
Unknown,
}Expand description
A normalized key press the game understands.
Variants§
Char(char)
A printable character (space arrives here too).
Enter
Enter / return key.
Backspace
Backspace / delete.
Esc
Escape key.
CtrlC
Ctrl+C — quits the game immediately.
Unknown
Any other key we intentionally ignore.
Trait Implementations§
impl Copy for GameKey
impl Eq for GameKey
impl StructuralPartialEq for GameKey
Auto Trait Implementations§
impl Forget for GameKey
impl Freeze for GameKey
impl RefUnwindSafe for GameKey
impl Send for GameKey
impl Sync for GameKey
impl Unpin for GameKey
impl UnsafeUnpin for GameKey
impl UnwindSafe for GameKey
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