pub struct LastWill {
pub topic: Bytes,
pub message: Bytes,
pub qos: QoS,
pub retain: bool,
pub properties: Option<LastWillProperties>,
}
Expand description
LastWill that broker forwards on behalf of the client
Fields§
§topic: Bytes
§message: Bytes
§qos: QoS
§retain: bool
§properties: Option<LastWillProperties>
Implementations§
Source§impl LastWill
impl LastWill
pub fn new( topic: impl Into<String>, payload: impl Into<Vec<u8>>, qos: QoS, retain: bool, properties: Option<LastWillProperties>, ) -> LastWill
pub fn read( connect_flags: u8, bytes: &mut Bytes, ) -> Result<Option<LastWill>, Error>
pub fn write(&self, buffer: &mut BytesMut) -> Result<u8, Error>
Trait Implementations§
impl Eq for LastWill
impl StructuralPartialEq for LastWill
Auto Trait Implementations§
impl !Freeze for LastWill
impl RefUnwindSafe for LastWill
impl Send for LastWill
impl Sync for LastWill
impl Unpin for LastWill
impl UnwindSafe for LastWill
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