Consumer

Trait Consumer 

Source
pub trait Consumer {
    type Payload;

    // Required methods
    fn consume<'life0, 'async_trait>(
        &'life0 self,
        rx: Receiver<Self::Payload>,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn consume_broadcast<'life0, 'async_trait>(
        &'life0 self,
        rx: Receiver<Self::Payload>,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}

Required Associated Types§

Required Methods§

Source

fn consume<'life0, 'async_trait>( &'life0 self, rx: Receiver<Self::Payload>, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn consume_broadcast<'life0, 'async_trait>( &'life0 self, rx: Receiver<Self::Payload>, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementors§