[−][src]Struct paho_mqtt::connect_options::ConnectOptionsBuilder
Builder to create the options to connect to the MQTT server.
Implementations
impl ConnectOptionsBuilder
[src]
pub fn new() -> Self
[src]
Creates a new ConnectOptionsBuilder
pub fn keep_alive_interval(
&mut self,
keep_alive_interval: Duration
) -> &mut Self
[src]
&mut self,
keep_alive_interval: Duration
) -> &mut Self
Sets the keep alive interval for the client session.
Arguments
keep_alive_interval
The maximum time that should pass without
communication between the client and server.
This has a resolution in seconds.
pub fn clean_session(&mut self, clean: bool) -> &mut Self
[src]
Sets the 'clean session' flag to send to the broker.
This is for MQTT v3.x connections, only.
Arguments
clean
Whether the broker should remove any previously-stored
information for this client.
pub fn clean_start(&mut self, clean: bool) -> &mut Self
[src]
Sets the 'clean start' flag to send to the broker.
This is for MQTT v5 connections only.
Arguments
clean
Whether the broker should remove any previously-stored
information for this client.
pub fn max_inflight(&mut self, max_inflight: i32) -> &mut Self
[src]
Sets the maximum number of in-flight messages that can be simultaneously handled by this client.
Arguments
max_inflight
The maximum number of messages that can be in-flight
at any given time with this client.
pub fn will_options(&mut self, will: WillOptions) -> &mut Self
[src]
Pass in a message with will_message
instead
pub fn will_message(&mut self, will: Message) -> &mut Self
[src]
pub fn ssl_options(&mut self, ssl: SslOptions) -> &mut Self
[src]
pub fn user_name<S>(&mut self, user_name: S) -> &mut Self where
S: Into<String>,
[src]
S: Into<String>,
Sets the user name for authentication with the broker. This works with the password.
Arguments
user_name
The user name to send to the broker.
pub fn password<S>(&mut self, password: S) -> &mut Self where
S: Into<String>,
[src]
S: Into<String>,
Sets the password for authentication with the broker. This works with the user name.
Arguments
password
The password to send to the broker.
pub fn connect_timeout(&mut self, timeout: Duration) -> &mut Self
[src]
Sets the time interval to allow the connect to complete.
Arguments
timeout
The time interval to allow the connect to
complete. This has a resolution of seconds.
pub fn retry_interval(&mut self, interval: Duration) -> &mut Self
[src]
pub fn server_uris<T>(&mut self, server_uris: &[T]) -> &mut Self where
T: AsRef<str>,
[src]
T: AsRef<str>,
Specify the servers to which the client will connect.
Arguments
server_uris
The addresses of the brokers to which this client
should connect.
pub fn mqtt_version(&mut self, ver: u32) -> &mut Self
[src]
Sets the version of MQTT to use on the connect.
Arguments
ver
The version of MQTT to use when connecting to the broker.
* (0) try the latest version (3.1.1) and work backwards
* (3) only try v3.1
* (4) only try v3.1.1
* (5) only try v5
pub fn automatic_reconnect(
&mut self,
min_retry_interval: Duration,
max_retry_interval: Duration
) -> &mut Self
[src]
&mut self,
min_retry_interval: Duration,
max_retry_interval: Duration
) -> &mut Self
Sets the client to automatically reconnect if the connection is lost.
Arguments
min_retry_interval
The minimum retry interval. Doubled on each
failed retry. This has a resolution in seconds.
max_retry_interval
The maximum retry interval. Doubling stops here
on failed retries. This has a resolution in
seconds.
pub fn properties(&mut self, props: Properties) -> &mut Self
[src]
Sets the collection of properties for the connections.
Arguments
props
The collection of properties to include with the connect message.
pub fn http_headers<N, V>(&mut self, coll: &[(N, V)]) -> &mut Self where
N: AsRef<str>,
V: AsRef<str>,
[src]
N: AsRef<str>,
V: AsRef<str>,
Sets the additional HTTP headers that will be sent in the WebSocket opening handshake.
pub fn http_proxy<S>(&mut self, proxy: S) -> &mut Self where
S: Into<String>,
[src]
S: Into<String>,
pub fn https_proxy<S>(&mut self, proxy: S) -> &mut Self where
S: Into<String>,
[src]
S: Into<String>,
pub fn finalize(&self) -> ConnectOptions
[src]
Finalize the builder to create the connect options.
Trait Implementations
impl Default for ConnectOptionsBuilder
[src]
pub fn default() -> ConnectOptionsBuilder
[src]
Auto Trait Implementations
impl RefUnwindSafe for ConnectOptionsBuilder
[src]
impl !Send for ConnectOptionsBuilder
[src]
impl !Sync for ConnectOptionsBuilder
[src]
impl Unpin for ConnectOptionsBuilder
[src]
impl UnwindSafe for ConnectOptionsBuilder
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,