Struct mosquitto_client::Callbacks[][src]

pub struct Callbacks<'a, T> {
    pub data: T,
    // some fields omitted
}

Handling mosquitto callbacks. This will pass a mutable reference to the contained data to the callbacks.

Fields

Methods

impl<'a, T> Callbacks<'a, T>
[src]

create a new callback handler with data. Initialize with an existing Mosquitto reference.

a reference to the Mosquitto instance

provide a closure which will be called when messages arrive. You are passed a mutable reference to data and the message

provide a closure which is called when connection happens. You are passed a mutable reference to data and the status.

provide a closure which is called after publishing a message. You are passed a mutable reference to data and the message id.

provide a closure which is called after subscribing. You are passed a mutable reference to data and the subscription id.

provide a closure which is called after unsubscribing from a topic You are passed a mutable reference to data and the subscription id.

provide a closure which is called when client disconnects from broker. You are passed a mutable reference to data and ....

provide a closure which is called for each log message You are passed a mutable reference to data, a logging level, and the text of the log message

Trait Implementations

impl<'a, T> Drop for Callbacks<'a, T>
[src]

Executes the destructor for this type. Read more

Auto Trait Implementations

impl<'a, T> !Send for Callbacks<'a, T>

impl<'a, T> !Sync for Callbacks<'a, T>