pub struct Publish { /* private fields */ }
Expand description
Arguments for a publish operation.
Implementations§
Source§impl Publish
impl Publish
Sourcepub fn set_qos(&mut self, qos: QoS) -> &mut Self
pub fn set_qos(&mut self, qos: QoS) -> &mut Self
Set MQTT quality of service.
The default is QoS::AtMostOnce.
Sourcepub fn set_retain(&mut self, retain: bool) -> &mut Self
pub fn set_retain(&mut self, retain: bool) -> &mut Self
Set value of the retain flag.
The default is false.
See MQTT 3.1.1 section 3.3.1.3 http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/errata01/os/mqtt-v3.1.1-errata01-os-complete.html#_Toc385349265
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Publish
impl RefUnwindSafe for Publish
impl Send for Publish
impl Sync for Publish
impl Unpin for Publish
impl UnwindSafe for Publish
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