#[repr(u8)]pub enum ConnectReasonCode {
Show 22 variants
Success = 0,
UnspecifiedError = 128,
MalformedPacket = 129,
ProtocolError = 130,
ImplementationSpecificError = 131,
UnsupportedProtocolVersion = 132,
ClientIdentifierNotValid = 133,
BadUserNameOrPassword = 134,
NotAuthorized = 135,
ServerUnavailable = 136,
ServerBusy = 137,
Banned = 138,
BadAuthMethod = 140,
TopicNameInvalid = 144,
PacketTooLarge = 149,
QuotaExceeded = 151,
PayloadFormatInvalid = 153,
RetainNotSupported = 154,
QoSNotSupported = 155,
UseAnotherServer = 156,
ServerMoved = 157,
ConnectionRateExceeded = 159,
}
Expand description
Reason code for CONNECT packet.
Dec | Hex | Reason Code name | Description |
---|---|---|---|
0 | 0x00 | Success | The Connection is accepted. |
128 | 0x80 | Unspecified error | The Server does not wish to reveal the reason for the failure, or none of the other Reason Codes apply. |
129 | 0x81 | Malformed Packet | Data within the CONNECT packet could not be correctly parsed. |
130 | 0x82 | Protocol Error | Data in the CONNECT packet does not conform to this specification. |
131 | 0x83 | Implementation specific error | The CONNECT is valid but is not accepted by this Server. |
132 | 0x84 | Unsupported Protocol Version | The Server does not support the version of the MQTT protocol requested by the Client. |
133 | 0x85 | Client Identifier not valid | The Client Identifier is a valid string but is not allowed by the Server. |
134 | 0x86 | Bad User Name or Password | The Server does not accept the User Name or Password specified by the Client |
135 | 0x87 | Not authorized | The Client is not authorized to connect. |
136 | 0x88 | Server unavailable | The MQTT Server is not available. |
137 | 0x89 | Server busy | The Server is busy. Try again later. |
138 | 0x8A | Banned | This Client has been banned by administrative action. Contact the server administrator. |
140 | 0x8C | Bad authentication method | The authentication method is not supported or does not match the authentication method currently in use. |
144 | 0x90 | Topic Name invalid | The Will Topic Name is not malformed, but is not accepted by this Server. |
149 | 0x95 | Packet too large | The CONNECT packet exceeded the maximum permissible size. |
151 | 0x97 | Quota exceeded | An implementation or administrative imposed limit has been exceeded. |
153 | 0x99 | Payload format invalid | The Will Payload does not match the specified Payload Format Indicator. |
154 | 0x9A | Retain not supported | The Server does not support retained messages, and Will Retain was set to 1. |
155 | 0x9B | QoS not supported | The Server does not support the QoS set in Will QoS. |
156 | 0x9C | Use another server | The Client should temporarily use another server. |
157 | 0x9D | Server moved | The Client should permanently use another server. |
159 | 0x9F | Connection rate exceeded | The connection rate limit has been exceeded. |
Variants§
Success = 0
UnspecifiedError = 128
MalformedPacket = 129
ProtocolError = 130
ImplementationSpecificError = 131
UnsupportedProtocolVersion = 132
ClientIdentifierNotValid = 133
BadUserNameOrPassword = 134
NotAuthorized = 135
ServerBusy = 137
Banned = 138
BadAuthMethod = 140
TopicNameInvalid = 144
PacketTooLarge = 149
QuotaExceeded = 151
PayloadFormatInvalid = 153
RetainNotSupported = 154
QoSNotSupported = 155
UseAnotherServer = 156
ServerMoved = 157
ConnectionRateExceeded = 159
Implementations§
Source§impl ConnectReasonCode
impl ConnectReasonCode
pub fn from_u8(value: u8) -> Option<ConnectReasonCode>
Trait Implementations§
Source§impl Clone for ConnectReasonCode
impl Clone for ConnectReasonCode
Source§fn clone(&self) -> ConnectReasonCode
fn clone(&self) -> ConnectReasonCode
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 ConnectReasonCode
impl Debug for ConnectReasonCode
Source§impl Hash for ConnectReasonCode
impl Hash for ConnectReasonCode
Source§impl PartialEq for ConnectReasonCode
impl PartialEq for ConnectReasonCode
impl Copy for ConnectReasonCode
impl Eq for ConnectReasonCode
impl StructuralPartialEq for ConnectReasonCode
Auto Trait Implementations§
impl Freeze for ConnectReasonCode
impl RefUnwindSafe for ConnectReasonCode
impl Send for ConnectReasonCode
impl Sync for ConnectReasonCode
impl Unpin for ConnectReasonCode
impl UnwindSafe for ConnectReasonCode
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