Channel

Trait Channel 

Source
pub trait Channel:
    Send
    + Sync
    + Debug {
    // Required methods
    fn id(&self) -> &str;
    fn send<'life0, 'async_trait>(
        &'life0 self,
        exchange: Exchange,
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: 'async_trait;
    fn as_any(&self) -> &(dyn Any + 'static);

    // Provided method
    fn kind(&self) -> &'static str { ... }
}
Expand description

Core channel trait providing send capabilities and metadata.

Implementors provide either sync or async send depending on the async feature.

Required Methods§

Source

fn id(&self) -> &str

Source

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

Source

fn as_any(&self) -> &(dyn Any + 'static)

Provided Methods§

Source

fn kind(&self) -> &'static str

Implementors§