pub struct NativeMqttClient { /* private fields */ }Expand description
Native MQTT client using rumqttc
Implementations§
Trait Implementations§
Source§impl MqttClient for NativeMqttClient
impl MqttClient for NativeMqttClient
Source§fn connect<'life0, 'async_trait>(
&'life0 self,
config: MqttConfig,
) -> Pin<Box<dyn Future<Output = SdkResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn connect<'life0, 'async_trait>(
&'life0 self,
config: MqttConfig,
) -> Pin<Box<dyn Future<Output = SdkResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Connect to MQTT broker
Source§fn disconnect<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = SdkResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn disconnect<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = SdkResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Disconnect from broker
Source§fn subscribe<'life0, 'life1, 'async_trait>(
&'life0 self,
topic: &'life1 str,
qos: MqttQoS,
) -> Pin<Box<dyn Future<Output = SdkResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn subscribe<'life0, 'life1, 'async_trait>(
&'life0 self,
topic: &'life1 str,
qos: MqttQoS,
) -> Pin<Box<dyn Future<Output = SdkResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Subscribe to a topic
Source§fn unsubscribe<'life0, 'life1, 'async_trait>(
&'life0 self,
topic: &'life1 str,
) -> Pin<Box<dyn Future<Output = SdkResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn unsubscribe<'life0, 'life1, 'async_trait>(
&'life0 self,
topic: &'life1 str,
) -> Pin<Box<dyn Future<Output = SdkResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Unsubscribe from a topic
Source§fn publish<'life0, 'async_trait>(
&'life0 self,
message: MqttMessage,
) -> Pin<Box<dyn Future<Output = SdkResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn publish<'life0, 'async_trait>(
&'life0 self,
message: MqttMessage,
) -> Pin<Box<dyn Future<Output = SdkResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Publish a message
Source§fn connection_state(&self) -> MqttConnectionState
fn connection_state(&self) -> MqttConnectionState
Get current connection state
Source§fn is_connected(&self) -> bool
fn is_connected(&self) -> bool
Check if connected
Source§impl MqttClientExt for NativeMqttClient
impl MqttClientExt for NativeMqttClient
Auto Trait Implementations§
impl Freeze for NativeMqttClient
impl !RefUnwindSafe for NativeMqttClient
impl Send for NativeMqttClient
impl Sync for NativeMqttClient
impl Unpin for NativeMqttClient
impl UnsafeUnpin for NativeMqttClient
impl !UnwindSafe for NativeMqttClient
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