[][src]Struct rumqtt::mqttoptions::MqttOptions

pub struct MqttOptions { /* fields omitted */ }

Mqtt options

Methods

impl MqttOptions
[src]

pub fn new<S: Into<String>, T: Into<String>>(
    id: S,
    host: T,
    port: u16
) -> MqttOptions
[src]

New mqtt options

pub fn broker_address(&self) -> (String, u16)
[src]

Broker address

pub fn set_keep_alive(self, secs: u16) -> Self
[src]

Set number of seconds after which client should ping the broker if there is no other data exchange

pub fn keep_alive(&self) -> Duration
[src]

Keep alive time

pub fn client_id(&self) -> String
[src]

Client identifier

pub fn set_max_packet_size(self, sz: usize) -> Self
[src]

Set packet size limit (in Kilo Bytes)

pub fn max_packet_size(&self) -> usize
[src]

Maximum packet size

pub fn set_clean_session(self, clean_session: bool) -> Self
[src]

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.

pub fn clean_session(&self) -> bool
[src]

Clean session

pub fn set_connection_method(self, opts: ConnectionMethod) -> Self
[src]

Set how to connect to a MQTT Broker (either TCP or Tls)

pub fn connection_method(&self) -> ConnectionMethod
[src]

pub fn set_proxy(self, proxy: Proxy) -> Self
[src]

pub fn proxy(&self) -> Proxy
[src]

pub fn set_reconnect_opts(self, opts: ReconnectOptions) -> Self
[src]

Time interval after which client should retry for new connection if there are any disconnections. By default, no retry will happen

pub fn reconnect_opts(&self) -> ReconnectOptions
[src]

Reconnection options

pub fn set_security_opts(self, opts: SecurityOptions) -> Self
[src]

Set security option Supports username-password auth, tls client cert auth, gcloud iotcore jwt auth

pub fn security_opts(&self) -> SecurityOptions
[src]

Security options

pub fn set_last_will(self, last_will: LastWill) -> Self
[src]

Set last will and testament

pub fn last_will(&self) -> Option<LastWill>
[src]

Last will and testament

pub fn set_notification_channel_capacity(self, capacity: usize) -> Self
[src]

Set notification channel capacity

pub fn notification_channel_capacity(&self) -> usize
[src]

Notification channel capacity

pub fn set_request_channel_capacity(self, capacity: usize) -> Self
[src]

Set request channel capacity

pub fn request_channel_capacity(&self) -> usize
[src]

Request channel capacity

pub fn set_outgoing_ratelimit(self, rate: u64) -> Self
[src]

Enables throttling and sets outoing message rate to the specified 'rate'

pub fn outgoing_ratelimit(&self) -> Option<u64>
[src]

Outgoing message rate

pub fn set_outgoing_queuelimit(self, queue_size: usize, delay: Duration) -> Self
[src]

Sleeps for the 'delay' about of time before sending the next message if the specified 'queue_size's are hit

pub fn outgoing_queuelimit(&self) -> (usize, Duration)
[src]

Outgoing queue limit

Trait Implementations

impl Default for MqttOptions
[src]

impl Clone for MqttOptions
[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for MqttOptions
[src]

Auto Trait Implementations

impl Send for MqttOptions

impl Sync for MqttOptions

Blanket Implementations

impl<T> From for T
[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Erased for T