Trait AsyncMqttWrite

Source
pub trait AsyncMqttWrite: AsyncWriteExt + Unpin {
    // Provided methods
    fn async_mqtt_write<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        packet: &'life1 Packet,
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             Self: Send + 'async_trait { ... }
    fn write_mqtt_string<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        string: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             Self: Send + 'async_trait { ... }
    fn write_remaining_length<'life0, 'async_trait>(
        &'life0 mut self,
        len: usize,
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: Send + 'async_trait { ... }
}
Expand description

Mqtt awareness on top of tokio’s AsyncWrite

Provided Methods§

Source

fn async_mqtt_write<'life0, 'life1, 'async_trait>( &'life0 mut self, packet: &'life1 Packet, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: Send + 'async_trait,

Source

fn write_mqtt_string<'life0, 'life1, 'async_trait>( &'life0 mut self, string: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: Send + 'async_trait,

Source

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

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<W> AsyncMqttWrite for W
where W: AsyncWriteExt + Unpin + ?Sized,

Implement MqttWrite for every AsyncWriteExt type (and hence AsyncWrite type)