Skip to main content

Publish

Trait Publish 

Source
pub trait Publish: ErrorType {
    // Required method
    fn publish<'a>(
        &'a mut self,
        topic: &'a str,
        qos: QoS,
        retain: bool,
        payload: &'a [u8],
    ) -> Result<MessageId, Self::Error>;
}

Required Methods§

Source

fn publish<'a>( &'a mut self, topic: &'a str, qos: QoS, retain: bool, payload: &'a [u8], ) -> Result<MessageId, Self::Error>

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl<P> Publish for &mut P
where P: Publish,

Source§

fn publish<'a>( &'a mut self, topic: &'a str, qos: QoS, retain: bool, payload: &'a [u8], ) -> Result<MessageId, Self::Error>

Implementors§