#[repr(u8)]pub enum ReasonCode {
Show 43 variants
Success = 0,
GrantedQos1 = 1,
GrantedQos2 = 2,
DisconnectWithWillMessage = 4,
NoMatchingSubscribers = 16,
NoSubscriptionExisted = 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,
}Expand description
A Reason Code is a one byte unsigned value that indicates the result of an operation. Reason Codes less than 128 indicate successful completion of an operation. The normal Reason Code for success is 0. Reason Code values of 128 or greater indicate failure.
Variants§
Success = 0
GrantedQos1 = 1
GrantedQos2 = 2
DisconnectWithWillMessage = 4
NoMatchingSubscribers = 16
NoSubscriptionExisted = 17
ContinueAuthentication = 24
ReAuthenticate = 25
UnspecifiedError = 128
MalformedPacket = 129
ProtocolError = 130
ImplementationSpecificError = 131
UnsupportedProtocolVersion = 132
ClientIdentifierNotValid = 133
BadUserNameOrPassword = 134
NotAuthorized = 135
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
ConnectionRateExceeded = 159
MaximumConnectTime = 160
SubscriptionIdentifiersNotSupported = 161
WildcardSubscriptionsNotSupported = 162
Implementations§
Trait Implementations§
Source§impl Clone for ReasonCode
impl Clone for ReasonCode
Source§fn clone(&self) -> ReasonCode
fn clone(&self) -> ReasonCode
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 From<AuthReasonCode> for ReasonCode
impl From<AuthReasonCode> for ReasonCode
Source§fn from(value: AuthReasonCode) -> Self
fn from(value: AuthReasonCode) -> Self
Converts to this type from the input type.
Source§impl From<ConnectReasonCode> for ReasonCode
impl From<ConnectReasonCode> for ReasonCode
Source§fn from(value: ConnectReasonCode) -> Self
fn from(value: ConnectReasonCode) -> Self
Converts to this type from the input type.
Source§impl From<DisconnectReasonCode> for ReasonCode
impl From<DisconnectReasonCode> for ReasonCode
Source§fn from(value: DisconnectReasonCode) -> Self
fn from(value: DisconnectReasonCode) -> Self
Converts to this type from the input type.
Source§impl From<PublishReasonCode> for ReasonCode
impl From<PublishReasonCode> for ReasonCode
Source§fn from(value: PublishReasonCode) -> Self
fn from(value: PublishReasonCode) -> Self
Converts to this type from the input type.
Source§impl From<PubrelReasonCode> for ReasonCode
impl From<PubrelReasonCode> for ReasonCode
Source§fn from(value: PubrelReasonCode) -> Self
fn from(value: PubrelReasonCode) -> Self
Converts to this type from the input type.
Source§impl From<SubscribeReasonCode> for ReasonCode
impl From<SubscribeReasonCode> for ReasonCode
Source§fn from(value: SubscribeReasonCode) -> Self
fn from(value: SubscribeReasonCode) -> Self
Converts to this type from the input type.
Source§impl From<UnsubscribeReasonCode> for ReasonCode
impl From<UnsubscribeReasonCode> for ReasonCode
Source§fn from(value: UnsubscribeReasonCode) -> Self
fn from(value: UnsubscribeReasonCode) -> Self
Converts to this type from the input type.
Source§impl PartialEq for ReasonCode
impl PartialEq for ReasonCode
Source§fn eq(&self, other: &ReasonCode) -> bool
fn eq(&self, other: &ReasonCode) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl TryFrom<ReasonCode> for AuthReasonCode
impl TryFrom<ReasonCode> for AuthReasonCode
Source§type Error = PacketReadError
type Error = PacketReadError
The type returned in the event of a conversion error.
Source§impl TryFrom<ReasonCode> for ConnectReasonCode
impl TryFrom<ReasonCode> for ConnectReasonCode
Source§type Error = PacketReadError
type Error = PacketReadError
The type returned in the event of a conversion error.
Source§impl TryFrom<ReasonCode> for DisconnectReasonCode
impl TryFrom<ReasonCode> for DisconnectReasonCode
Source§type Error = PacketReadError
type Error = PacketReadError
The type returned in the event of a conversion error.
Source§impl TryFrom<ReasonCode> for PublishReasonCode
impl TryFrom<ReasonCode> for PublishReasonCode
Source§type Error = PacketReadError
type Error = PacketReadError
The type returned in the event of a conversion error.
Source§impl TryFrom<ReasonCode> for PubrelReasonCode
impl TryFrom<ReasonCode> for PubrelReasonCode
Source§type Error = PacketReadError
type Error = PacketReadError
The type returned in the event of a conversion error.
Source§impl TryFrom<ReasonCode> for SubscribeReasonCode
impl TryFrom<ReasonCode> for SubscribeReasonCode
Source§type Error = PacketReadError
type Error = PacketReadError
The type returned in the event of a conversion error.
Source§impl TryFrom<ReasonCode> for UnsubscribeReasonCode
impl TryFrom<ReasonCode> for UnsubscribeReasonCode
Source§type Error = PacketReadError
type Error = PacketReadError
The type returned in the event of a conversion error.
impl Copy for ReasonCode
impl StructuralPartialEq for ReasonCode
Auto Trait Implementations§
impl Freeze for ReasonCode
impl RefUnwindSafe for ReasonCode
impl Send for ReasonCode
impl Sync for ReasonCode
impl Unpin for ReasonCode
impl UnsafeUnpin 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