Struct for_mqtt_client::Client
source · pub struct Client { /* private fields */ }
Implementations§
source§impl Client
impl Client
pub async fn publish<T: Into<Arc<String>>, D: Into<Bytes>>( &self, topic: T, qos: QoS, payload: D, retain: bool ) -> Result<u32, ClientErr>
pub async fn publish_with_trace_id<T: Into<Arc<String>>, D: Into<Bytes>>( &self, topic: T, qos: QoS, payload: D, retain: bool, trace_id: u32 ) -> Result<(), ClientErr>
pub async fn publish_by_arc<T: Into<Arc<String>>>( &self, topic: T, qos: QoS, payload: Arc<Bytes>, retain: bool ) -> Result<u32, ClientErr>
pub async fn to_subscribe<T: Into<String>>( &self, topic: T, qos: QoS ) -> Result<u32, ClientErr>
pub async fn to_subscribe_with_trace_id<T: Into<String>>( &self, topic: T, qos: QoS, id: u32 ) -> Result<(), ClientErr>
pub async fn unsubscribe(&self, topic: String) -> Result<u32, ClientErr>
pub async fn unsubscribe_with_trace_id( &self, topic: String, id: u32 ) -> Result<(), ClientErr>
pub async fn disconnect(&self) -> Result<(), ClientErr>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more