pub trait EventHandler<E: Event>: Send + Sync {
// Required method
fn handle<'life0, 'life1, 'async_trait>(
&'life0 self,
event: &'life1 E,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
// Provided methods
fn priority(&self) -> i32 { ... }
fn early(&self) -> bool { ... }
}
Expand description
Event handler trait