pub trait SubscriberFunc<E>: Send + Sync
where E: Event,
{ // Required method fn call<'life0, 'async_trait>( &'life0 self, event: Arc<E>, data: Arc<RwLock<<E as Event>::Data>> ) -> Pin<Box<dyn Future<Output = Result<EventState, Report>> + Send + 'async_trait>> where 'life0: 'async_trait, Self: 'async_trait; }

Required Methods§

source

fn call<'life0, 'async_trait>( &'life0 self, event: Arc<E>, data: Arc<RwLock<<E as Event>::Data>> ) -> Pin<Box<dyn Future<Output = Result<EventState, Report>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Implementors§

source§

impl<T, E, F> SubscriberFunc<E> for T
where T: Send + Sync + Fn(Arc<E>, Arc<RwLock<<E as Event>::Data>>) -> F, E: Event + 'static, F: Future<Output = Result<EventState, Report>> + Send,