Enum ReasonCode

Source
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 ReasonCode is an identifier describing a response in any ackowledgement packet (such as Connack or SubAck)

Variants§

§

Success = 0

Generic success reason code indicating an operation performed well. According to the emmiting packet, the following meanings are applied:

  • Disconnect: Normal Disconnection
  • SubAck: Granted QoS 0
§

GrantedQoS1 = 1

The subscription is accepted and the maximum QoS sent will be QoS 1.

§

GrantedQoS2 = 2

The subscription is accepted and any received QoS will be sent..

§

DisconnectWithWillMessage = 4

The client disconnects but want the last will to be sent anyways.

§

NoMatchingSubscribers = 16

The message is accepted but there are no subscribers.

§

NoSubscriptionExisted = 17

No matching topic filter is being used by the client

§

ContinueAuthentication = 24

Continue de authentication with another step

§

ReAuthenticate = 25

Initiate re-Authentication

§

UnspecifiedError = 128

The server doesn’t want or cannot describe the error

§

MalformedPacket = 129

The control packet cannot be parsed or is ill-formed

§

ProtocolError = 130

The control packet is well formed but invalid according to specifications.

§

ImplementationSpecificError = 131

The operation is valid but not accepted by, the server

§

UnsupportedProtocolVersion = 132

The requested MQTT version is not supported

§

ClientIdentifierNotValid = 133

The client identifier is not valid

§

BadUserNameOrPassword = 134

The server does not accept the given user name or password

§

NotAuthorized = 135

The operation is not permitted

§

ServerUnavailable = 136

The server is not available

§

ServerBusy = 137

The server is busy

§

Banned = 138

The client is banned

§

ServerShuttingDown = 139

The server is currently shutting down

§

BadAuthenticationMethod = 140

The authentication method is not supported by the server

§

KeepAliveTimeout = 141

The connection is closed because not packet has been received for 1.5 times the keep alive period.

§

SessionTakenOver = 142

Another connection using the same client id has connected, causing this connection to be closed.

§

TopicFilterInvalid = 143

The topic filter is correctly formed but not accepted by the server.

§

TopicNameInvalid = 144

The topic name is correctly formed but not accepted by the server

§

PacketIdentifierInUse = 145

The packet identifier is already in use. This might indicate a mismatch in the session state between the client and the server.

§

PacketIdentifierNotFound = 146

The Packet Identifier is not known. This is not an error during recovery, but at other times indicates a mismatch between the Session State on the Client and Server.

§

ReceiveMaximumExceeded = 147

The Client or Server has received more than receive maximum.

§

TopicAliasInvalid = 148

The topic alias is invalid

§

PacketTooLarge = 149

The packet size is greater than the maximum packet size fo rthis client or server.

§

MessageRateTooHigh = 150

The received data is too high

§

QuotaExceeded = 151

An implementation or administrative limite has been exceeded

§

AdministrativeAction = 152

The connection is closed due to an administrative action

§

PayloadFormatInvalid = 153

The payload format does not match the one indicated in the payload format indicator.

§

RetainNotSupported = 154

The server does not support retain messages

§

QoSNotSupported = 155

The client specified a QoS greater than the maximum indicated in the Connack packet.

§

UseAnotherServer = 156

The client should temporarily change its server.

§

ServerMoved = 157

The client should permanently change its server.

§

SharedSubscriptionsNotSupported = 158

The server does not support shared subscriptions

§

ConnectionRateExceeded = 159

The connection is closed because the connection rate is too high

§

MaximumConnectTime = 160

The maximum connect time authorized for this connection has exceeded.

§

SubscriptionIdentifiersNotSupported = 161

The server does no support subscription identifiers.

§

WildcardSubscriptionsNotSupported = 162

The server does not support wildcard subcriptions.

Trait Implementations§

Source§

impl Clone for ReasonCode

Source§

fn clone(&self) -> ReasonCode

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ReasonCode

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<Error> for ReasonCode

Source§

fn from(e: SageError) -> Self

Converts to this type from the input type.
Source§

impl From<ReasonCode> for Error

Source§

fn from(rc: ReasonCode) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for ReasonCode

Source§

fn eq(&self, other: &ReasonCode) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl TryFrom<u8> for ReasonCode

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: u8) -> Result<Self, SageError>

Performs the conversion.
Source§

impl Copy for ReasonCode

Source§

impl StructuralPartialEq for ReasonCode

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.