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>

source§

fn clone(&self) -> ClientOption<'a>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'a> Debug for ClientOption<'a>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'a> PartialEq for ClientOption<'a>

source§

fn eq(&self, other: &ClientOption<'a>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<'a> Eq for ClientOption<'a>

source§

impl<'a> StructuralEq for ClientOption<'a>

source§

impl<'a> StructuralPartialEq for ClientOption<'a>

Auto Trait Implementations§

§

impl<'a> RefUnwindSafe for ClientOption<'a>

§

impl<'a> Send for ClientOption<'a>

§

impl<'a> Sync for ClientOption<'a>

§

impl<'a> Unpin for ClientOption<'a>

§

impl<'a> UnwindSafe for ClientOption<'a>

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.