Struct prototty_unix::Context
[−]
[src]
pub struct Context { /* fields omitted */ }
An interface to a terminal for rendering View
s, and getting input.
Methods
impl Context
[src]
fn new() -> Result<Self>
[src]
Initialise a new context using the current terminal.
fn drain_input(&mut self) -> Result<Drain<'a, Input>>
[src]
fn poll_input(&mut self) -> Result<Option<Input>>
[src]
Gets an input event from the terminal if one is present, returning immediately.
fn wait_input(&mut self) -> Result<Input>
[src]
Gets an input event from the terminal, waiting until an event occurs.
fn wait_input_timeout(&mut self, timeout: Duration) -> Result<Option<Input>>
[src]
Gets an input event from the terminal, waiting until
either an event occurs, or the timeout expires, in which
case this method returns None
.