[][src]Struct mosquitto_client_wrapper::MosqMessage

pub struct MosqMessage { /* fields omitted */ }

A mosquitto message

Implementations

impl MosqMessage[src]

pub fn topic(&self) -> &str[src]

the topic of the message. This will panic if the topic isn't valid UTF-8

pub fn payload(&self) -> &[u8][src]

the payload as bytes

pub fn text(&self) -> &str[src]

the payload as text. This will panic if the payload was not valid UTF-8

pub fn qos(&self) -> u32[src]

the quality-of-service of the message. The desired QoS is specified when we subscribe.

pub fn retained(&self) -> bool[src]

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 Clone for MosqMessage[src]

impl Debug for MosqMessage[src]

impl Drop for MosqMessage[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.