Enum ReasonCode
#[repr(u8)]pub enum ReasonCode {
Show 44 variants
Success = 0,
GrantedQos1 = 1,
GrantedQos2 = 2,
DisconnectWithWillMessage = 4,
NoMatchingSubscribers = 16,
NoSubscriptionFound = 17,
ContinueAuthentication = 24,
ReAuthenticate = 25,
UnspecifiedError = 128,
MalformedPacket = 129,
ProtocolError = 130,
ImplementationSpecificError = 131,
UnsupportedProtocolVersion = 132,
ClientIdentifierNotValid = 133,
BadUserNameOrPassword = 134,
NotAuthorized = 135,
ServerUnavailable = 136,
ServerBusy = 137,
Banned = 138,
ServerShuttingDown = 139,
BadAuthenticationMethod = 140,
KeepAliveTimeout = 141,
SessionTakenOver = 142,
TopicFilterInvalid = 143,
TopicNameInvalid = 144,
PacketIdentifierInUse = 145,
PacketIdentifierNotFound = 146,
ReceiveMaximumExceeded = 147,
TopicAliasInvalid = 148,
PacketTooLarge = 149,
MessageRateTooHigh = 150,
QuotaExceeded = 151,
AdministrativeAction = 152,
PayloadFormatInvalid = 153,
RetainNotSupported = 154,
QosNotSupported = 155,
UseAnotherServer = 156,
ServerMoved = 157,
SharedSubscriptionsNotSupported = 158,
ConnectionRateExceeded = 159,
MaximumConnectTime = 160,
SubscriptionIdentifiersNotSupported = 161,
WildcardSubscriptionsNotSupported = 162,
MqttppV3Code = 255,
}Expand description
MQTT v5 single-byte reason codes.
Variants§
Success = 0
The operation completed successfully.
Also used as NormalDisconnection and GrantedQos0.
GrantedQos1 = 1
The subscription was accepted and the maximum QoS sent will be 1.
GrantedQos2 = 2
The subscription was accepted and the maximum QoS sent will be 2.
DisconnectWithWillMessage = 4
The client wishes to disconnect but requires that the server also publishes its Will message.
NoMatchingSubscribers = 16
The message was accepted but there are no subscribers. Only sent by the broker if the broker was configured to send this when there are no matching subscribers.
NoSubscriptionFound = 17
No matching topic filter is being used by the client. Only sent by the broker in response to an UNSUBSCRIBE packet.
ContinueAuthentication = 24
Continue the authentication with another step.
ReAuthenticate = 25
Initiate re-authentication.
UnspecifiedError = 128
The server does not wish to reveal the reason for the failure, or none of the other reason codes apply.
MalformedPacket = 129
Data within the packet could not be correctly parsed.
ProtocolError = 130
Data in the packet does not conform to the MQTT specification.
ImplementationSpecificError = 131
An operation is not accepted and the server is not willing to reveal the reason.
UnsupportedProtocolVersion = 132
The server does not support the version of the MQTT protocol requested by the client.
ClientIdentifierNotValid = 133
The client identifier is a valid string but is not allowed by the server.
BadUserNameOrPassword = 134
The server does not accept the user name or password specified by the client.
NotAuthorized = 135
The request is not authorized.
The MQTT server is not available.
ServerBusy = 137
The server is busy. Try again later.
Banned = 138
This client has been banned by administrative action. Contact the server operator.
ServerShuttingDown = 139
The server is shutting down.
BadAuthenticationMethod = 140
The authentication method is not supported or does not match the authentication method currently in use.
KeepAliveTimeout = 141
The connection is closed because no packet has been received for 1.5x the keep-alive time.
SessionTakenOver = 142
Another connection using the same client ID has connected, causing this connection to be closed.
TopicFilterInvalid = 143
The topic filter format is not allowed by the server.
TopicNameInvalid = 144
The topic name is not accepted by the client or server.
PacketIdentifierInUse = 145
The packet identifier is already in use. This might indicate a mismatch in the session state between the client and server.
PacketIdentifierNotFound = 146
The packet identifier is not known. This is not an error during recovery; it is a sign of mismatch between the session state on the client and server.
ReceiveMaximumExceeded = 147
The client or server has received more than the receive maximum it sent in the CONNECT or CONNACK packet.
TopicAliasInvalid = 148
The topic alias was greater than the maximum topic alias sent in the CONNECT or CONNACK packet.
PacketTooLarge = 149
The packet size is greater than the maximum packet size for this client or server.
MessageRateTooHigh = 150
The received data rate is too high.
QuotaExceeded = 151
An implementation or administrative imposed limit has been exceeded.
AdministrativeAction = 152
The connection is closed due to an administrative action.
PayloadFormatInvalid = 153
The payload format does not match the one specified in the payload format indicator.
RetainNotSupported = 154
The server does not support retained messages.
QosNotSupported = 155
The client specified a QoS greater than the QoS specified in a maximum QoS in the CONNACK.
UseAnotherServer = 156
The client should temporarily use another server.
ServerMoved = 157
The client should permanently use another server.
The server does not support shared subscriptions.
ConnectionRateExceeded = 159
The connection rate limit has been exceeded.
MaximumConnectTime = 160
The maximum connection time authorized for this connection has been exceeded.
SubscriptionIdentifiersNotSupported = 161
The server does not support subscription identifiers. The subscription is not accepted.
WildcardSubscriptionsNotSupported = 162
The server does not support wildcard subscriptions; the subscription is not accepted.
MqttppV3Code = 255
Not a protocol-defined reason code. Used internally by the Paho C library for MQTT v3 error codes.
Implementations§
§impl ReasonCode
impl ReasonCode
pub const NormalDisconnection: ReasonCode = ReasonCode::Success
pub const NormalDisconnection: ReasonCode = ReasonCode::Success
Reason code for a normal disconnect
pub const GrantedQos0: ReasonCode = ReasonCode::Success
pub const GrantedQos0: ReasonCode = ReasonCode::Success
Reason code for QoS 0 granted
Trait Implementations§
§impl Clone for ReasonCode
impl Clone for ReasonCode
§fn clone(&self) -> ReasonCode
fn clone(&self) -> ReasonCode
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more