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
Auto Trait Implementations§
impl<'a> Freeze for LastWill<'a>
impl<'a> RefUnwindSafe for LastWill<'a>
impl<'a> Send for LastWill<'a>
impl<'a> Sync for LastWill<'a>
impl<'a> Unpin for LastWill<'a>
impl<'a> UnwindSafe for LastWill<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more