pub trait EventHandler {
type Reaction;
// Required methods
fn interests(&self) -> Option<Interest>;
fn handle(&mut self, event: &Event) -> Vec<Self::Reaction>;
}Expand description
A resource which can be managed by the reactor.
Required Associated Types§
Sourcetype Reaction
type Reaction
The type of reactions which this resource may generate upon receiving
I/O from the reactor via EventHandler::handle. These events are
passed to the reactor crate::reactor::ReactionHandler.