pub trait KeyReader {
// Required method
fn read_key(&mut self, timeout: Duration) -> Option<Key>;
}Expand description
Abstraction over the terminal so prompts can be driven by mock input.
Implementors return the next normalized Key, or None when timeout
elapses without a key press (or at end of a mocked input queue).
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".