Skip to main content

EventHandler

Trait EventHandler 

Source
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§

Source

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

Implementors§