pub trait Handler {
// Required methods
fn event(&mut self, id: usize, event: Event);
fn error(&mut self, id: usize, err: Error);
fn tick(&mut self);
fn cleanup(&mut self);
}Required Methods§
Sourcefn event(&mut self, id: usize, event: Event)
fn event(&mut self, id: usize, event: Event)
Submitted interest, id is the one passed to ReactorApi.
Tasks run between chunks of events of one poll, so id may belong to
a registration released by a task after the poll.
Sourcefn error(&mut self, id: usize, err: Error)
fn error(&mut self, id: usize, err: Error)
Operation submission has failed, id is the one passed to ReactorApi.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".