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 strThe topic to publish in
message: &'a [u8]The message (aka payload) to publish
retain: boolWhether the last will message should be retained
qos: QoSThe quality of service of the last will message