Struct mosquitto_client::MosqMessage [−][src]
pub struct MosqMessage { /* fields omitted */ }
A mosquitto message
Methods
impl MosqMessage
[src]
impl MosqMessage
pub fn topic(&self) -> &str
[src]
pub fn topic(&self) -> &str
the topic of the message. This will panic if the topic isn't valid UTF-8
pub fn payload(&self) -> &[u8]
[src]
pub fn payload(&self) -> &[u8]
the payload as bytes
pub fn text(&self) -> &str
[src]
pub fn text(&self) -> &str
the payload as text. This will panic if the payload was not valid UTF-8
pub fn qos(&self) -> u32
[src]
pub fn qos(&self) -> u32
the quality-of-service of the message. The desired QoS is specified when we subscribe.
pub fn retained(&self) -> bool
[src]
pub fn retained(&self) -> bool
was the message retained by the broker? True if we received this as a retained message. Subsequent messages marked as retained will not set this.
Trait Implementations
impl Debug for MosqMessage
[src]
impl Debug for MosqMessage
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Clone for MosqMessage
[src]
impl Clone for MosqMessage
fn clone(&self) -> Self
[src]
fn clone(&self) -> Self
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl Drop for MosqMessage
[src]
impl Drop for MosqMessage
Auto Trait Implementations
impl !Send for MosqMessage
impl !Send for MosqMessage
impl !Sync for MosqMessage
impl !Sync for MosqMessage