ChannelAdapter

Trait ChannelAdapter 

Source
pub trait ChannelAdapter:
    Send
    + Sync
    + 'static {
    // Required methods
    fn name(&self) -> String;
    fn send<'life0, 'life1, 'async_trait>(
        &'life0 self,
        event: &'life1 Event,
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

The ChannelAdapter trait defines the interface for all channel adapters.

Required Methods§

Source

fn name(&self) -> String

Sends an event to the channel.

Source

fn send<'life0, 'life1, 'async_trait>( &'life0 self, event: &'life1 Event, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Sends an event to the channel.

Implementors§