Skip to main content

ReasonCode

Enum ReasonCode 

Source
pub enum ReasonCode {
Show 58 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, MqoqNoFlowState = 179, MqoqNotFlowOwner = 180, MqoqStreamTypeError = 181, MqoqBadFlowId = 182, MqoqPersistentTopic = 183, MqoqPersistentSubError = 184, MqoqOptionalHeader = 185, MqoqIncompletePacket = 186, MqoqFlowOpenIdle = 187, MqoqFlowCancelled = 188, MqoqFlowPacketCancelled = 189, MqoqFlowRefused = 190, MqoqDiscardState = 191, MqoqServerPushNotWelcome = 192, MqoqRecoveryFailed = 193,
}

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

§

MqoqNoFlowState = 179

§

MqoqNotFlowOwner = 180

§

MqoqStreamTypeError = 181

§

MqoqBadFlowId = 182

§

MqoqPersistentTopic = 183

§

MqoqPersistentSubError = 184

§

MqoqOptionalHeader = 185

§

MqoqIncompletePacket = 186

§

MqoqFlowOpenIdle = 187

§

MqoqFlowCancelled = 188

§

MqoqFlowPacketCancelled = 189

§

MqoqFlowRefused = 190

§

MqoqDiscardState = 191

§

MqoqServerPushNotWelcome = 192

§

MqoqRecoveryFailed = 193

Implementations§

Source§

impl ReasonCode

Source

pub fn is_success(&self) -> bool

Source

pub fn is_error(&self) -> bool

Source

pub fn is_mqoq_error(&self) -> bool

Source

pub fn mqoq_error_level(&self) -> Option<u8>

Source

pub fn from_u8(value: u8) -> Option<Self>

Source

pub fn to_quic_stream_code(self) -> Option<QuicStreamCode>

Source

pub fn from_quic_stream_code(code: QuicStreamCode) -> Option<Self>

Trait Implementations§

Source§

impl Clone for ReasonCode

Source§

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)

Performs copy-assignment from source. Read more
Source§

impl Copy for ReasonCode

Source§

impl Debug for ReasonCode

Source§

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

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

impl Eq for ReasonCode

Source§

impl From<ReasonCode> for u8

Source§

fn from(code: ReasonCode) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for ReasonCode

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
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> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more