Skip to main content

Client

Trait Client 

Source
pub trait Client: ErrorType {
    // Required methods
    fn subscribe<'a>(
        &'a mut self,
        topic: &'a str,
        qos: QoS,
    ) -> Result<MessageId, Self::Error>;
    fn unsubscribe<'a>(
        &'a mut self,
        topic: &'a str,
    ) -> Result<MessageId, Self::Error>;
}

Required Methods§

Source

fn subscribe<'a>( &'a mut self, topic: &'a str, qos: QoS, ) -> Result<MessageId, Self::Error>

Source

fn unsubscribe<'a>( &'a mut self, topic: &'a str, ) -> 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<C> Client for &mut C
where C: Client,

Source§

fn subscribe<'a>( &'a mut self, topic: &'a str, qos: QoS, ) -> Result<MessageId, Self::Error>

Source§

fn unsubscribe<'a>( &'a mut self, topic: &'a str, ) -> Result<MessageId, Self::Error>

Implementors§