Subscriber

Trait Subscriber 

Source
pub trait Subscriber<E: Event>: Send + Sync {
    // Required methods
    fn is_once(&self) -> bool;
    fn on_emit<'life0, 'async_trait>(
        &'life0 mut self,
        event: Arc<E>,
        data: Arc<RwLock<E::Data>>,
    ) -> Pin<Box<dyn Future<Output = EventResult> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: '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::Data>>, ) -> Pin<Box<dyn Future<Output = EventResult> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementors§