pub trait EventSource {
// Required methods
fn read_event(&mut self) -> Result<Event>;
fn poll_event(&mut self) -> Result<Option<Event>>;
fn poll_event_timeout(&mut self, timeout: Duration) -> Result<Option<Event>>;
}Expand description
Blocking and non-blocking reads from one normalized event source.
Required Methods§
Sourcefn read_event(&mut self) -> Result<Event>
fn read_event(&mut self) -> Result<Event>
Blocks until one supported terminal event is available.
Sourcefn poll_event(&mut self) -> Result<Option<Event>>
fn poll_event(&mut self) -> Result<Option<Event>>
Returns one already-waiting event without blocking.