SubTrait

Trait SubTrait 

Source
pub trait SubTrait {
    type Item: DeserializeOwned + Send + Sync;

    // Required method
    fn subscribe<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<BoxStream<'_, Result<(Self::Item, Arc<dyn AckTrait + Send + Sync>), SubError>>, SubError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Subscription interface returning a stream of decoded items and ack handles.

Required Associated Types§

Required Methods§

Source

fn subscribe<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<BoxStream<'_, Result<(Self::Item, Arc<dyn AckTrait + Send + Sync>), SubError>>, SubError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementors§

Source§

impl<T> SubTrait for Sub<T>
where T: DeserializeOwned + Send + Sync,

Source§

type Item = T