Struct prototty_unix::Context

source ·
pub struct Context { /* private fields */ }
Expand description

An interface to a terminal for rendering Views, and getting input.

Implementations§

Initialise a new context using the current terminal.

Gets an input event from the terminal if one is present, returning immediately.

Gets an input event from the terminal, waiting until an event occurs.

Gets an input event from the terminal, waiting until either an event occurs, or the timeout expires, in which case this method returns None.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.