Trait Handle

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

Implement for event handler

Required Methods§

Source

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

Handle event which is published from EventBus

Implementors§