#[repr(u8)]
pub enum DisconnectReasonCode {
Show 29 variants NormalDisconnection, DisconnectWithWillMessage, UnspecifiedError, MalformedPacket, ProtocolError, ImplementationSpecificError, NotAuthorized, ServerBusy, ServerShuttingDown, KeepAliveTimeout, SessionTakenOver, TopicFilterInvalid, TopicNameInvalid, ReceiveMaximumExceeded, TopicAliasInvalid, PacketTooLarge, MessageRateTooHigh, QuotaExceeded, AdministrativeAction, PayloadFormatInvalid, RetainNotSupported, QoSNotSupported, UseAnotherServer, ServerMoved, SharedSubscriptionNotSupported, ConnectionRateExceeded, MaximumConnectTime, SubscriptionIdentifiersNotSupported, WildcardSubscriptionsNotSupported,
}

Variants§

§

NormalDisconnection

Close the connection normally. Do not send the Will Message.

§

DisconnectWithWillMessage

The Client wishes to disconnect but requires that the Server also publishes its Will Message.

§

UnspecifiedError

The Connection is closed but the sender either does not wish to reveal the reason, or none of the other Reason Codes apply.

§

MalformedPacket

The received packet does not conform to this specification.

§

ProtocolError

An unexpected or out of order packet was received.

§

ImplementationSpecificError

The packet received is valid but cannot be processed by this implementation.

§

NotAuthorized

The request is not authorized.

§

ServerBusy

The Server is busy and cannot continue processing requests from this Client.

§

ServerShuttingDown

The Server is shutting down.

§

KeepAliveTimeout

The Connection is closed because no packet has been received for 1.5 times the Keepalive time.

§

SessionTakenOver

Another Connection using the same ClientID has connected causing this Connection to be closed.

§

TopicFilterInvalid

The Topic Filter is correctly formed, but is not accepted by this Sever.

§

TopicNameInvalid

The Topic Name is correctly formed, but is not accepted by this Client or Server.

§

ReceiveMaximumExceeded

The Client or Server has received more than Receive Maximum publication for which it has not sent PUBACK or PUBCOMP.

§

TopicAliasInvalid

The Client or Server has received a PUBLISH packet containing a Topic Alias which is greater than the Maximum Topic Alias it sent in the CONNECT or CONNACK packet.

§

PacketTooLarge

The packet size is greater than Maximum Packet Size for this Client or Server.

§

MessageRateTooHigh

The received data rate is too high.

§

QuotaExceeded

An implementation or administrative imposed limit has been exceeded.

§

AdministrativeAction

The Connection is closed due to an administrative action.

§

PayloadFormatInvalid

The payload format does not match the one specified by the Payload Format Indicator.

§

RetainNotSupported

The Server has does not support retained messages.

§

QoSNotSupported

The Client specified a QoS greater than the QoS specified in a Maximum QoS in the CONNACK.

§

UseAnotherServer

The Client should temporarily change its Server.

§

ServerMoved

The Server is moved and the Client should permanently change its server location.

§

SharedSubscriptionNotSupported

The Server does not support Shared Subscriptions.

§

ConnectionRateExceeded

This connection is closed because the connection rate is too high.

§

MaximumConnectTime

The maximum connection time authorized for this connection has been exceeded.

§

SubscriptionIdentifiersNotSupported

The Server does not support Subscription Identifiers; the subscription is not accepted.

§

WildcardSubscriptionsNotSupported

The Server does not support Wildcard subscription; the subscription is not accepted.

Trait Implementations§

source§

impl Clone for DisconnectReasonCode

source§

fn clone(&self) -> DisconnectReasonCode

Returns a copy 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 DisconnectReasonCode

source§

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

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

impl PartialEq<DisconnectReasonCode> for DisconnectReasonCode

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl TryFrom<u8> for DisconnectReasonCode

§

type Error = PacketParseError

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

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

Performs the conversion.
source§

impl Copy for DisconnectReasonCode

source§

impl Eq for DisconnectReasonCode

source§

impl StructuralEq for DisconnectReasonCode

source§

impl StructuralPartialEq for DisconnectReasonCode

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

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

const: unstable · 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 Twhere T: Clone,

§

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 Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
source§

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

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.