Skip to main content

AsyncEventHandler

Trait AsyncEventHandler 

Source
pub trait AsyncEventHandler: Send + Sync {
    // Required method
    fn handle<'life0, 'life1, 'async_trait>(
        &'life0 self,
        event: &'life1 Event,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Async event handler trait.

Required Methods§

Source

fn handle<'life0, 'life1, 'async_trait>( &'life0 self, event: &'life1 Event, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Handle an event asynchronously.

Implementors§