Trait switchboard_on_demand::prelude::EventHandler

source ·
pub trait EventHandler: Send + Sync {
    // Required method
    fn handle_event<'life0, 'life1, 'async_trait>(
        &'life0 self,
        data: &'life1 [u8],
    ) -> Pin<Box<dyn Future<Output = Result<(), OnDemandError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}

Required Methods§

source

fn handle_event<'life0, 'life1, 'async_trait>( &'life0 self, data: &'life1 [u8], ) -> Pin<Box<dyn Future<Output = Result<(), OnDemandError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Implementors§

source§

impl<E, S> EventHandler for EventHandlerImpl<E, S>
where E: Event + Send + Sync + 'static, S: EventSenderTrait<E>,