Struct lmc::options::LastWill

source ·
pub struct LastWill<'a> {
    pub topic: &'a str,
    pub message: &'a [u8],
    pub retain: bool,
    pub qos: QoS,
}
Expand description

LastWill describes a message to be published if the client disconnects unexpectedly, e.g. if the socket gets closed before a DISCONNECT packet could be sent by the client.

Fields§

§topic: &'a str

The topic to publish in

§message: &'a [u8]

The message (aka payload) to publish

§retain: bool

Whether the last will message should be retained

§qos: QoS

The quality of service of the last will message

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.