pub trait EventHandler: Send + Sync {
// Required method
fn on_event_change<'life0, 'async_trait>(
&'life0 self,
change: EventChange,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Trait for handling events
Required Methods§
Sourcefn on_event_change<'life0, 'async_trait>(
&'life0 self,
change: EventChange,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn on_event_change<'life0, 'async_trait>(
&'life0 self,
change: EventChange,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Called when any event change occurs