pub enum Event<'e, const MAX_SUBSCRIPTION_IDENTIFIERS: usize> {
Pingresp,
Publish(Publish<'e, MAX_SUBSCRIPTION_IDENTIFIERS>),
Suback(Suback),
Unsuback(Suback),
PublishRejected(Pubrej),
PublishAcknowledged(Puback),
PublishReceived(Puback),
PublishReleased(Puback),
PublishComplete(Puback),
Ignored,
Duplicate,
}Expand description
Events emitted by the client when receiving an MQTT packet.
Variants§
Pingresp
The server sent a PINGRESP packet.
Publish(Publish<'e, MAX_SUBSCRIPTION_IDENTIFIERS>)
The server sent a PUBLISH packet.
The client has acted as follows:
Suback(Suback)
The server sent a SUBACK packet matching a SUBSCRIBE packet.
The subscription process is complete and was successful if the reason code indicates success. The SUBSCRIBE packet won’t have to be resent.
Unsuback(Suback)
The server sent an UNSUBACK packet matching an UNSUBSCRIBE packet.
The unsubscription process is complete and was successful if the reason code indicates success. The UNSUBSCRIBE packet won’t have to be resent.
PublishRejected(Pubrej)
The server sent a PUBACK or PUBREC with an erroneous reason code, therefore rejecting the publication.
The included reason code is always erroneous.
The publication process is aborted.
PublishAcknowledged(Puback)
The server sent a PUBACK packet matching a QoS 1 PUBLISH packet
confirming that the PUBLISH has been received.
The included reason code is always successful.
The QoS 1 publication process is complete,
the PUBLISH packet won’t have to be resent.
PublishReceived(Puback)
The server sent a PUBREC packet matching a QoS 2 PUBLISH packet
confirming that the PUBLISH has been received.
The included reason code is always successful.
The client has responded with a PUBREL packet.
The first handshake of the QoS 2 publication process is complete,
the PUBLISH packet won’t have to be resent.
PublishReleased(Puback)
The server sent a PUBREL packet matching a QoS 2 PUBREC packet
confirming that the PUBREC has been received.
The included reason code is always successful.
The client has responded with a PUBCOMP packet.
The QoS 2 publication process is complete,
the PUBREC packet won’t have to be resent.
PublishComplete(Puback)
The server sent a PUBCOMP packet matching a QoS 2 PUBREL packet
confirming that the PUBREL has been received.
The included reason code is always successful.
The QoS 2 publication process is complete,
the PUBREL packet won’t have to be resent.
Ignored
The server sent a SUBACK, PUBACK, PUBREC, PUBREL or PUBCOMP packet with a packet identifier that is not in flight (anymore).
The client has not responded to the server or has responded appropriately to prevent a potential protocol deadlock.
Duplicate
The server sent a QoS 2 PUBLISH packet which would cause a duplicate.
The client has responded with a PUBREC packet.