Enum mosquitto_rs::ClientOption
source · pub enum ClientOption<'a> {
ProtocolVersion(ProtocolVersion),
ReceiveMaximum(u16),
SendMaximum(u16),
OcspRequired(bool),
TlsEngine(&'a str),
TlsKeyForm(&'a str),
TlsKPassSha1(&'a str),
TlsALPN(&'a str),
}
Variants§
ProtocolVersion(ProtocolVersion)
Specifies the version of the MQTT protocol to be used. Defaults to ProtocolVersion::V31
ReceiveMaximum(u16)
Value can be set between 1 and 65535 inclusive, and represents the maximum number of incoming QoS 1 and QoS 2 messages that this client wants to process at once. Defaults to 20. This option is not valid for MQTT v3.1 or v3.1.1 clients. Note that if the MQTT_PROP_RECEIVE_MAXIMUM property is in the proplist passed to mosquitto_connect_v5(), then that property will override this option. Using this option is the recommended method however.
SendMaximum(u16)
Value can be set between 1 and 65535 inclusive, and represents the maximum number of outgoing QoS 1 and QoS 2 messages that this client will attempt to have “in flight” at once. Defaults to 20. This option is not valid for MQTT v3.1 or v3.1.1 clients. Note that if the broker being connected to sends a MQTT_PROP_RECEIVE_MAXIMUM property that has a lower value than this option, then the broker provided value will be used.
OcspRequired(bool)
Set whether OCSP checking on TLS connections is required. The default is false for no checking
TlsEngine(&'a str)
Configure the client for TLS Engine support; set this to a TLS Engine ID to be used when creating TLS connections.
TlsKeyForm(&'a str)
Configure the client to treat the keyfile differently depending on its type. Must be set before <mosquitto_connect>. Set as either “pem” or “engine”, to determine from where the private key for a TLS connection will be obtained. Defaults to “pem”, a normal private key file.
TlsKPassSha1(&'a str)
Where the TLS Engine requires the use of a password to be accessed, this option allows a hex encoded SHA1 hash of the private key password to be passed to the engine directly. Must be set before <mosquitto_connect>.
TlsALPN(&'a str)
If the broker being connected to has multiple services available on a single TLS port, such as both MQTT and WebSockets, use this option to configure the ALPN option for the connection.
Trait Implementations§
source§impl<'a> Clone for ClientOption<'a>
impl<'a> Clone for ClientOption<'a>
source§fn clone(&self) -> ClientOption<'a>
fn clone(&self) -> ClientOption<'a>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl<'a> Debug for ClientOption<'a>
impl<'a> Debug for ClientOption<'a>
source§impl<'a> PartialEq for ClientOption<'a>
impl<'a> PartialEq for ClientOption<'a>
source§fn eq(&self, other: &ClientOption<'a>) -> bool
fn eq(&self, other: &ClientOption<'a>) -> bool
self
and other
values to be equal, and is used
by ==
.