Struct mqttrust_core::MqttOptions [−][src]
pub struct MqttOptions<'a> { /* fields omitted */ }
Expand description
Options to configure the behaviour of mqtt connection
Lifetimes:
- ’a: The lifetime of option fields, not referenced in any MQTT packets at any point
- ’b: The lifetime of the packet fields, backed by a slice buffer
Implementations
New mqtt options
pub fn set_client_auth(
self,
cert: &'a [u8],
key: &'a [u8],
password: Option<&'a [u8]>
) -> Self
Set number of seconds after which client should ping the broker if there is no other data exchange
Keep alive time
clean_session = true
removes all the state from queues & instructs the broker
to clean all the client state when client disconnects.
When set false
, broker will hold the client state and performs pending
operations on the client when reconnection with same client_id
happens. Local queue state is also held to retransmit packets after reconnection.
Clean session
Username and password
Security options
Set number of concurrent in flight messages
Trait Implementations
Auto Trait Implementations
impl<'a> Send for MqttOptions<'a>
impl<'a> Sync for MqttOptions<'a>
impl<'a> Unpin for MqttOptions<'a>