Enum minimq::ReasonCode
source · #[repr(u8)]pub enum ReasonCode {
Show 42 variants
Success = 0,
GrantedQos1 = 1,
GrantedQos2 = 2,
DisconnectWithWill = 4,
NoMatchingSubscribers = 16,
NoSubscriptionExisted = 17,
ContinueAuthentication = 24,
Reuathenticate = 25,
UnspecifiedError = 128,
MalformedPacket = 129,
ProtocolError = 130,
ImplementationError = 131,
UnsupportedProtocol = 132,
ClientIdentifierInvalid = 133,
BadUsernameOrPassword = 134,
NotAuthorized = 135,
ServerUnavailable = 136,
ServerBusy = 137,
BadAuthMethod = 140,
KeepAliveTimeout = 141,
SessionTakenOver = 142,
TopicFilterInvalid = 143,
TopicNameInvalid = 144,
PacketIdInUse = 145,
PacketIdNotFound = 146,
ReceiveMaxExceeded = 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,
Unknown = 255,
}
Expand description
MQTTv5-defined codes that may be returned in response to control packets.
Variants§
Success = 0
GrantedQos1 = 1
GrantedQos2 = 2
DisconnectWithWill = 4
NoMatchingSubscribers = 16
NoSubscriptionExisted = 17
ContinueAuthentication = 24
Reuathenticate = 25
UnspecifiedError = 128
MalformedPacket = 129
ProtocolError = 130
ImplementationError = 131
UnsupportedProtocol = 132
ClientIdentifierInvalid = 133
BadUsernameOrPassword = 134
NotAuthorized = 135
ServerBusy = 137
BadAuthMethod = 140
KeepAliveTimeout = 141
SessionTakenOver = 142
TopicFilterInvalid = 143
TopicNameInvalid = 144
PacketIdInUse = 145
PacketIdNotFound = 146
ReceiveMaxExceeded = 147
TopicAliasINvalid = 148
PacketTooLarge = 149
MessageRateTooHigh = 150
QuotaExceeded = 151
AdministrativeAction = 152
PayloadFormatInvalid = 153
RetainNotSupported = 154
QosNotSupported = 155
UseAnotherServer = 156
ServerMoved = 157
ConnectionRateExceeded = 159
MaximumConnectTime = 160
SubscriptionIdentifiersNotSupported = 161
WildcardSubscriptionsNotSupported = 162
Unknown = 255
The reason code is not one of the documented MQTT reason codes.
Implementations§
Trait Implementations§
source§impl Clone for ReasonCode
impl Clone for ReasonCode
source§fn clone(&self) -> ReasonCode
fn clone(&self) -> ReasonCode
Returns a copy 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 ReasonCode
impl Debug for ReasonCode
source§impl<'de> Deserialize<'de> for ReasonCode
impl<'de> Deserialize<'de> for ReasonCode
source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
source§impl From<&ReasonCode> for u8
impl From<&ReasonCode> for u8
source§fn from(code: &ReasonCode) -> u8
fn from(code: &ReasonCode) -> u8
Converts to this type from the input type.
source§impl From<ReasonCode> for ProtocolError
impl From<ReasonCode> for ProtocolError
source§fn from(code: ReasonCode) -> Self
fn from(code: ReasonCode) -> Self
Converts to this type from the input type.
source§impl From<ReasonCode> for Result<(), ReasonCode>
impl From<ReasonCode> for Result<(), ReasonCode>
source§fn from(code: ReasonCode) -> Result<(), ReasonCode>
fn from(code: ReasonCode) -> Result<(), ReasonCode>
Converts to this type from the input type.
source§impl From<ReasonCode> for u8
impl From<ReasonCode> for u8
source§fn from(enum_value: ReasonCode) -> Self
fn from(enum_value: ReasonCode) -> Self
Converts to this type from the input type.
source§impl<T, E: Into<ReasonCode>> From<Result<T, E>> for ReasonCode
impl<T, E: Into<ReasonCode>> From<Result<T, E>> for ReasonCode
source§fn from(result: Result<T, E>) -> ReasonCode
fn from(result: Result<T, E>) -> ReasonCode
Converts to this type from the input type.
source§impl From<u8> for ReasonCode
impl From<u8> for ReasonCode
source§impl FromPrimitive for ReasonCode
impl FromPrimitive for ReasonCode
source§impl PartialEq for ReasonCode
impl PartialEq for ReasonCode
source§fn eq(&self, other: &ReasonCode) -> bool
fn eq(&self, other: &ReasonCode) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for ReasonCode
impl PartialOrd for ReasonCode
source§fn partial_cmp(&self, other: &ReasonCode) -> Option<Ordering>
fn partial_cmp(&self, other: &ReasonCode) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl Serialize for ReasonCode
impl Serialize for ReasonCode
impl Copy for ReasonCode
impl StructuralPartialEq for ReasonCode
Auto Trait Implementations§
impl RefUnwindSafe for ReasonCode
impl Send for ReasonCode
impl Sync for ReasonCode
impl Unpin for ReasonCode
impl UnwindSafe for ReasonCode
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