Trait starbase::Subscriber

source ·
pub trait Subscriber<E>: Send + Sync
where E: Event,
{ // Required methods fn is_once(&self) -> bool; fn on_emit<'life0, 'async_trait>( &'life0 mut 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 is_once(&self) -> bool

source

fn on_emit<'life0, 'async_trait>( &'life0 mut 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<E> Subscriber<E> for CallbackSubscriber<E>
where E: Event,