Struct mqtt_async_client::client::Publish [−][src]
Arguments for a publish operation.
Implementations
impl Publish
[src]
pub fn new(topic: String, payload: Vec<u8>) -> Publish
[src]
Construct a new instance.
pub fn topic(&self) -> &str
[src]
Returns the topic name of this instance.
pub fn payload(&self) -> &[u8]
[src]
Returns the payload data of this instance.
pub fn qos(&self) -> QoS
[src]
Returns the QoS level configured.
pub fn set_qos(&mut self, qos: QoS) -> &mut Self
[src]
Set MQTT quality of service.
The default is QoS::AtMostOnce.
pub fn set_retain(&mut self, retain: bool) -> &mut Self
[src]
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
pub fn retain(&self) -> bool
[src]
Returns the retain flag value configured.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Publish
[src]
impl Send for Publish
[src]
impl Sync for Publish
[src]
impl Unpin for Publish
[src]
impl UnwindSafe for Publish
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,