Struct paho_mqtt::will_options::WillOptions
[−]
[src]
pub struct WillOptions { pub opts: MQTTAsync_willOptions, // some fields omitted }
The options for the Last Will and Testament (LWT)
Fields
opts: MQTTAsync_willOptions
Methods
impl WillOptions
[src]
fn new() -> WillOptions
fn from_message<V>(topic: &str, payload: V) -> WillOptions where
V: Into<Vec<u8>>,
V: Into<Vec<u8>>,
fn get_payload(&self) -> &Vec<u8>
Gets the payload of the LWT
fn get_payload_str(&self) -> Result<String, FromUtf8Error>
Gets the payload of the message as a string. Note that this clones the payload.
fn get_qos(&self) -> i32
Returns the Quality of Service (QOS) for the message.
fn get_retained(&self) -> bool
Gets the 'retained' flag for the message.
Trait Implementations
impl Debug for WillOptions
[src]
impl Clone for WillOptions
[src]
fn clone(&self) -> WillOptions
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more