#[non_exhaustive]pub enum ConnectReasonCode {
Show 22 variants
Success,
UnspecifiedError,
MalformedPacket,
ProtocolError,
ImplementationSpecificError,
UnsupportedProtocolVersion,
ClientIdentifierNotValid,
BadUserNamePassword,
NotAuthorized,
ServerUnavailable,
ServerBusy,
Banned,
BadAuthenticationMethod,
TopicNameInvalid,
PacketTooLarge,
QuotaExceeded,
PayloadFormatInvalid,
RetainNotSupported,
QoSNotSupported,
UseAnotherServer,
ServerMoved,
ConnectionRateExceeded,
}Expand description
Reason a broker rejected (or accepted) a connection attempt.
Modeled as the MQTT 5 CONNACK reason-code superset; MQTT 3.1.1 return codes map into the matching subset. Codes that can only be produced by an MQTT 5 broker are documented as such and are never emitted in 0.3.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Success
Connection accepted
UnspecifiedError
The broker does not wish to reveal the reason (MQTT 5 only)
MalformedPacket
CONNECT packet could not be parsed correctly (MQTT 5 only)
ProtocolError
Data in the CONNECT does not conform to the specification (MQTT 5 only)
ImplementationSpecificError
Implementation-specific rejection (MQTT 5 only)
UnsupportedProtocolVersion
Broker does not support the requested protocol version
ClientIdentifierNotValid
Client identifier is valid UTF-8 but not allowed by the broker
BadUserNamePassword
Username or password rejected
NotAuthorized
Client is not authorized to connect
MQTT service is unavailable
ServerBusy
Broker is busy, try again later (MQTT 5 only)
Banned
Client has been banned by administrative action (MQTT 5 only)
BadAuthenticationMethod
Authentication method is not supported (MQTT 5 only)
TopicNameInvalid
Will topic name is not accepted (MQTT 5 only)
PacketTooLarge
CONNECT packet exceeded broker’s maximum packet size (MQTT 5 only)
QuotaExceeded
Implementation or administrative quota exceeded (MQTT 5 only)
PayloadFormatInvalid
Will payload does not match its payload format indicator (MQTT 5 only)
RetainNotSupported
Broker does not support retained messages (MQTT 5 only)
QoSNotSupported
Will QoS is higher than the broker supports (MQTT 5 only)
UseAnotherServer
Client should temporarily use another server (MQTT 5 only)
ServerMoved
Client should permanently use another server (MQTT 5 only)
ConnectionRateExceeded
Connection rate limit exceeded (MQTT 5 only)
Trait Implementations§
Source§impl Clone for ConnectReasonCode
impl Clone for ConnectReasonCode
Source§fn clone(&self) -> ConnectReasonCode
fn clone(&self) -> ConnectReasonCode
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for ConnectReasonCode
Source§impl Debug for ConnectReasonCode
impl Debug for ConnectReasonCode
impl Eq for ConnectReasonCode
Source§impl PartialEq for ConnectReasonCode
impl PartialEq 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 UnsafeUnpin 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.