pub trait Messenger: Sync + Send {
    // Required methods
    fn new<'async_trait>(
        config: MessengerConfig
    ) -> Pin<Box<dyn Future<Output = Result<Self, MessengerError>> + Send + 'async_trait>>
       where Self: Sized + 'async_trait;
    fn messenger_type(&self) -> MessengerType;
    fn add_stream<'life0, 'async_trait>(
        &'life0 mut self,
        stream_key: &'static str
    ) -> Pin<Box<dyn Future<Output = Result<(), MessengerError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn set_buffer_size<'life0, 'async_trait>(
        &'life0 mut self,
        stream_key: &'static str,
        max_buffer_size: usize
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn send<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        stream_key: &'static str,
        bytes: &'life1 [u8]
    ) -> Pin<Box<dyn Future<Output = Result<(), MessengerError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn recv<'life0, 'async_trait>(
        &'life0 mut self,
        stream_key: &'static str,
        consumption_type: ConsumptionType
    ) -> Pin<Box<dyn Future<Output = Result<Vec<RecvData>, MessengerError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn stream_size<'life0, 'async_trait>(
        &'life0 mut self,
        stream_key: &'static str
    ) -> Pin<Box<dyn Future<Output = Result<u64, MessengerError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn ack_msg<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        stream_key: &'static str,
        ids: &'life1 [String]
    ) -> Pin<Box<dyn Future<Output = Result<(), MessengerError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}

Required Methods§

source

fn new<'async_trait>( config: MessengerConfig ) -> Pin<Box<dyn Future<Output = Result<Self, MessengerError>> + Send + 'async_trait>>
where Self: Sized + 'async_trait,

source

fn messenger_type(&self) -> MessengerType

source

fn add_stream<'life0, 'async_trait>( &'life0 mut self, stream_key: &'static str ) -> Pin<Box<dyn Future<Output = Result<(), MessengerError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn set_buffer_size<'life0, 'async_trait>( &'life0 mut self, stream_key: &'static str, max_buffer_size: usize ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn send<'life0, 'life1, 'async_trait>( &'life0 mut self, stream_key: &'static str, bytes: &'life1 [u8] ) -> Pin<Box<dyn Future<Output = Result<(), MessengerError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

source

fn recv<'life0, 'async_trait>( &'life0 mut self, stream_key: &'static str, consumption_type: ConsumptionType ) -> Pin<Box<dyn Future<Output = Result<Vec<RecvData>, MessengerError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn stream_size<'life0, 'async_trait>( &'life0 mut self, stream_key: &'static str ) -> Pin<Box<dyn Future<Output = Result<u64, MessengerError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn ack_msg<'life0, 'life1, 'async_trait>( &'life0 mut self, stream_key: &'static str, ids: &'life1 [String] ) -> Pin<Box<dyn Future<Output = Result<(), MessengerError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Implementors§