[][src]Struct crossterm::event::KeyEvent

pub struct KeyEvent {
    pub code: KeyCode,
    pub modifiers: KeyModifiers,
}

Represents a key event.

Fields

code: KeyCode

The key itself.

modifiers: KeyModifiers

Additional key modifiers.

Methods

impl KeyEvent[src]

pub fn new(code: KeyCode, modifiers: KeyModifiers) -> KeyEvent[src]

Trait Implementations

impl Clone for KeyEvent[src]

impl Copy for KeyEvent[src]

impl Debug for KeyEvent[src]

impl<'de> Deserialize<'de> for KeyEvent[src]

impl Eq for KeyEvent[src]

impl From<KeyCode> for KeyEvent[src]

impl Hash for KeyEvent[src]

impl PartialEq<KeyEvent> for KeyEvent[src]

impl PartialOrd<KeyEvent> for KeyEvent[src]

impl Serialize for KeyEvent[src]

impl StructuralEq for KeyEvent[src]

impl StructuralPartialEq for KeyEvent[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.