1 2 3 4 5 6 7 8 9 10
use crate::errors::Result; use crate::events::InputEvent; pub trait InputEventSource: Send { fn recv(&mut self) -> Result<InputEvent>; } pub trait InputEventSink: Send { fn send(&mut self, e: InputEvent) -> Result<()>; }