Skip to main content

Inputs

Trait Inputs 

Source
pub trait Inputs {
    // Required method
    fn next(&mut self, wait: Duration) -> Result<Option<Input>>;
}
Expand description

Where the terminal’s events come from: the keyboard in run, a script in tests.

Required Methods§

Source

fn next(&mut self, wait: Duration) -> Result<Option<Input>>

The next event, or None when none arrives within wait.

§Errors

The terminal’s error when it cannot be read.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§