#[repr(u8)]pub enum DisconnectReasonCode {
Show 29 variants
NormalDisconnect = 0,
DisconnectWithWillMessage = 4,
UnspecifiedError = 128,
MalformedPacket = 129,
ProtocolError = 130,
ImplementationSpecificError = 131,
NotAuthorized = 135,
ServerBusy = 137,
ServerShuttingDown = 139,
KeepAliveTimeout = 141,
SessionTakenOver = 142,
TopicFilterInvalid = 143,
TopicNameInvalid = 144,
ReceiveMaximumExceeded = 147,
TopicAliasInvalid = 148,
PacketTooLarge = 149,
MessageRateTooHigh = 150,
QuotaExceeded = 151,
AdministrativeAction = 152,
PayloadFormatInvalid = 153,
RetainNotSupported = 154,
QoSNotSupported = 155,
UserAnotherServer = 156,
ServerMoved = 157,
SharedSubscriptionNotSupported = 158,
ConnectionRateExceeded = 159,
MaximumConnectTime = 160,
SubscriptionIdentifiersNotSupported = 161,
WildcardSubscriptionsNotSupported = 162,
}
Expand description
Reason code for DISCONNECT packet.
Dec | Hex | Reason Code name | Sent by | Description |
---|---|---|---|---|
0 | 0x00 | Normal disconnection | Client/Server | Close the connection normally. Do not send the Will Message. |
4 | 0x04 | Disconnect with Will Message | Client | The Client wishes to disconnect but requires that the Server also publishes its Will Message. |
128 | 0x80 | Unspecified error | Client/Server | The Connection is closed but the sender either does not wish to reveal the reason, |
or none of the other Reason Codes apply. | ||||
129 | 0x81 | Malformed Packet | Client/Server | The received packet does not conform to this specification. |
130 | 0x82 | Protocol Error | Client/Server | An unexpected or out of order packet was received. |
131 | 0x83 | Implementation specific error | Client/Server | The packet received is valid but cannot be processed by this implementation. |
135 | 0x87 | Not authorized | Server | The request is not authorized. |
137 | 0x89 | Server busy | Server | The Server is busy and cannot continue processing requests from this Client. |
139 | 0x8B | Server shutting down | Server | The Server is shutting down. |
141 | 0x8D | Keep Alive timeout | Server | The Connection is closed because no packet has been received for 1.5 times the Keepalive time. |
142 | 0x8E | Session taken over | Server | Another Connection using the same ClientID has connected causing this Connection to be closed. |
143 | 0x8F | Topic Filter invalid | Server | The Topic Filter is correctly formed, but is not accepted by this Sever. |
144 | 0x90 | Topic Name invalid | Client/Server | The Topic Name is correctly formed, but is not accepted by this Client/Server. |
147 | 0x93 | Receive Maximum exceeded | Client/Server | The Client/Server has received more than Receive Maximum publication for |
which it has not sent PUBACK or PUBCOMP. | ||||
148 | 0x94 | Topic Alias invalid | Client/Server | The Client/Server has received a PUBLISH packet containing a Topic Alias |
which is greater than the Maximum Topic Alias it sent in the CONNECT or CONNACK packet. | ||||
149 | 0x95 | Packet too large | Client/Server | The packet size is greater than Maximum Packet Size for this Client/Server. |
150 | 0x96 | Message rate too high | Client/Server | The received data rate is too high. |
151 | 0x97 | Quota exceeded | Client/Server | An implementation or administrative imposed limit has been exceeded. |
152 | 0x98 | Administrative action | Client/Server | The Connection is closed due to an administrative action. |
153 | 0x99 | Payload format invalid | Client/Server | The payload format does not match the one specified by the Payload Format Indicator. |
154 | 0x9A | Retain not supported | Server | The Server has does not support retained messages. |
155 | 0x9B | QoS not supported | Server | The Client specified a QoS greater than the QoS specified in a Maximum QoS in the CONNACK. |
156 | 0x9C | Use another server | Server | The Client should temporarily change its Server. |
157 | 0x9D | Server moved | Server | The Server is moved and the Client should permanently change its server location. |
158 | 0x9E | Shared Subscriptions not supported | Server | The Server does not support Shared Subscriptions. |
159 | 0x9F | Connection rate exceeded | Server | This connection is closed because the connection rate is too high. |
160 | 0xA0 | Maximum connect time | Server | The maximum connection time authorized for this connection has been exceeded. |
161 | 0xA1 | Subscription Identifiers not supported | Server | The Server does not support Subscription Identifiers; the subscription is not accepted. |
162 | 0xA2 | Wildcard Subscriptions not supported | Server | The Server does not support Wildcard Subscriptions; the subscription is not accepted. |
Variants§
NormalDisconnect = 0
DisconnectWithWillMessage = 4
UnspecifiedError = 128
MalformedPacket = 129
ProtocolError = 130
ImplementationSpecificError = 131
NotAuthorized = 135
ServerBusy = 137
ServerShuttingDown = 139
KeepAliveTimeout = 141
SessionTakenOver = 142
TopicFilterInvalid = 143
TopicNameInvalid = 144
ReceiveMaximumExceeded = 147
TopicAliasInvalid = 148
PacketTooLarge = 149
MessageRateTooHigh = 150
QuotaExceeded = 151
AdministrativeAction = 152
PayloadFormatInvalid = 153
RetainNotSupported = 154
QoSNotSupported = 155
UserAnotherServer = 156
ServerMoved = 157
ConnectionRateExceeded = 159
MaximumConnectTime = 160
SubscriptionIdentifiersNotSupported = 161
WildcardSubscriptionsNotSupported = 162
Implementations§
Trait Implementations§
Source§impl Clone for DisconnectReasonCode
impl Clone for DisconnectReasonCode
Source§fn clone(&self) -> DisconnectReasonCode
fn clone(&self) -> DisconnectReasonCode
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for DisconnectReasonCode
impl Debug for DisconnectReasonCode
Source§impl Hash for DisconnectReasonCode
impl Hash for DisconnectReasonCode
Source§impl PartialEq for DisconnectReasonCode
impl PartialEq for DisconnectReasonCode
impl Copy for DisconnectReasonCode
impl Eq for DisconnectReasonCode
impl StructuralPartialEq for DisconnectReasonCode
Auto Trait Implementations§
impl Freeze for DisconnectReasonCode
impl RefUnwindSafe for DisconnectReasonCode
impl Send for DisconnectReasonCode
impl Sync for DisconnectReasonCode
impl Unpin for DisconnectReasonCode
impl UnwindSafe for DisconnectReasonCode
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more