[−][src]Trait mosquitto_rs::Callbacks
Defines handlers that can be used to determine when various functions have completed.
Provided methods
pub fn on_connect(&self, _client: &mut Mosq, _reason: ConnectionStatus)
[src]
called when the connection has been acknowledged by the broker.
reason
holds the connection return code.
Use reason.is_successful
to test whether the connection was
successful.
pub fn on_disconnect(&self, _client: &mut Mosq, _reason: c_int)
[src]
Called when the broker has received the DISCONNECT command
pub fn on_publish(&self, _client: &mut Mosq, _mid: MessageId)
[src]
Called when the message identifier by mid
has been sent
to the broker successfully.
pub fn on_subscribe(
&self,
_client: &mut Mosq,
_mid: MessageId,
_granted_qos: &[QoS]
)
[src]
&self,
_client: &mut Mosq,
_mid: MessageId,
_granted_qos: &[QoS]
)
Called when the broker responds to a subscription request.
pub fn on_message(
&self,
_client: &mut Mosq,
_mid: MessageId,
_topic: String,
_payload: &[u8],
_qos: QoS,
_retain: bool
)
[src]
&self,
_client: &mut Mosq,
_mid: MessageId,
_topic: String,
_payload: &[u8],
_qos: QoS,
_retain: bool
)
Called when a message matching a subscription is received from the broker