pub trait ConsoleReadExt {
// Required methods
fn events_and_raw(self) -> EventsAndRaw<Self> ⓘ
where Self: Sized;
fn events(self) -> Events<Self> ⓘ
where Self: Sized;
fn keys(self) -> Keys<Self> ⓘ
where Self: Sized;
fn get_event(&mut self) -> Option<Result<Event>>;
fn get_event_timeout(&mut self, timeout: Duration) -> Option<Result<Event>>;
fn get_key(&mut self) -> Option<Result<Key>>;
}
Expand description
Extension to ConsoleRead
trait.
Required Methods§
Sourcefn events_and_raw(self) -> EventsAndRaw<Self> ⓘwhere
Self: Sized,
fn events_and_raw(self) -> EventsAndRaw<Self> ⓘwhere
Self: Sized,
An iterator over input events and the raw bytes that make them.
Sourcefn get_event(&mut self) -> Option<Result<Event>>
fn get_event(&mut self) -> Option<Result<Event>>
Get the next input event from the console. This version will block until an event is ready. Returns None if the Console has no more data vs a read that would block.