[][src]Enum endbasic_core::console::Key

pub enum Key {
    ArrowDown,
    ArrowLeft,
    ArrowRight,
    ArrowUp,
    Backspace,
    CarriageReturn,
    Char(char),
    Eof,
    Escape,
    Interrupt,
    NewLine,
    Unknown(String),
}

Decoded key presses as returned by the console.

Variants

ArrowDown

The cursor down key.

ArrowLeft

The cursor left key.

ArrowRight

The cursor right key.

ArrowUp

The cursor up key.

Backspace

Deletes the previous character.

CarriageReturn

Accepts the current line.

Char(char)

A printable character.

Eof

Indicates a request for termination (e.g. Ctrl-D).

Escape

The escape key.

Interrupt

Indicates a request for interrupt (e.g. Ctrl-C).

NewLine

Accepts the current line.

Unknown(String)

An unknown character or sequence. The text describes what went wrong.

Trait Implementations

impl Clone for Key[src]

impl Debug for Key[src]

Auto Trait Implementations

impl RefUnwindSafe for Key

impl Send for Key

impl Sync for Key

impl Unpin for Key

impl UnwindSafe for Key

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> 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.