Skip to main content

MessageWriter

Trait MessageWriter 

Source
pub trait MessageWriter: Send {
    // Required method
    fn send<'life0, 'async_trait>(
        &'life0 mut self,
        payload: String,
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Push-based async sender for outbound messages.

Required Methods§

Source

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

Trait Implementations§

Source§

impl MessageWriter for Box<dyn MessageWriter>

Source§

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

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl MessageWriter for Box<dyn MessageWriter>

Source§

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

Implementors§