Skip to main content

ReasonCode

Enum ReasonCode 

Source
#[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

MQTT-5.0 Reason Code.

Variants§

§

Success = 0

0 Success / Normal Disconnection / Granted QoS 0.

§

GrantedQoS1 = 1

1 Granted QoS 1.

§

GrantedQoS2 = 2

2 Granted QoS 2.

§

DisconnectWithWillMessage = 4

4 Disconnect with Will Message.

§

NoMatchingSubscribers = 16

16 No Matching Subscribers.

§

NoSubscriptionExisted = 17

17 No Subscription Existed.

§

ContinueAuthentication = 24

24 Continue Authentication.

§

Reauthenticate = 25

25 Re-authenticate.

§

UnspecifiedError = 128

128 Unspecified Error.

§

MalformedPacket = 129

129 Malformed Packet.

§

ProtocolError = 130

130 Protocol Error.

§

ImplementationSpecificError = 131

131 Implementation specific Error.

§

UnsupportedProtocolVersion = 132

132 Unsupported Protocol Version.

§

ClientIdentifierNotValid = 133

133 Client Identifier not valid.

§

BadUserNameOrPassword = 134

134 Bad User Name or Password.

§

NotAuthorized = 135

135 Not authorized.

§

ServerUnavailable = 136

136 Server unavailable.

§

ServerBusy = 137

137 Server busy.

§

Banned = 138

138 Banned.

§

ServerShuttingDown = 139

139 Server shutting down.

§

BadAuthenticationMethod = 140

140 Bad authentication method.

§

KeepAliveTimeout = 141

141 Keep Alive timeout.

§

SessionTakenOver = 142

142 Session taken over.

§

TopicFilterInvalid = 143

143 Topic Filter invalid.

§

TopicNameInvalid = 144

144 Topic Name invalid.

§

PacketIdentifierInUse = 145

145 Packet Identifier in use.

§

PacketIdentifierNotFound = 146

146 Packet Identifier not found.

§

ReceiveMaximumExceeded = 147

147 Receive Maximum exceeded.

§

TopicAliasInvalid = 148

148 Topic Alias invalid.

§

PacketTooLarge = 149

149 Packet too large.

§

MessageRateTooHigh = 150

150 Message rate too high.

§

QuotaExceeded = 151

151 Quota exceeded.

§

AdministrativeAction = 152

152 Administrative action.

§

PayloadFormatInvalid = 153

153 Payload format invalid.

§

RetainNotSupported = 154

154 Retain not supported.

§

QoSNotSupported = 155

155 QoS not supported.

§

UseAnotherServer = 156

156 Use another server.

§

ServerMoved = 157

157 Server moved.

§

SharedSubscriptionsNotSupported = 158

158 Shared Subscriptions not supported.

§

ConnectionRateExceeded = 159

159 Connection rate exceeded.

§

MaximumConnectTime = 160

160 Maximum connect time.

§

SubscriptionIdentifiersNotSupported = 161

161 Subscription Identifiers not supported.

§

WildcardSubscriptionsNotSupported = 162

162 Wildcard Subscriptions not supported.

Implementations§

Source§

impl ReasonCode

Source

pub const fn is_error(self) -> bool

true wenn Code >= 0x80 (Spec §2.4.1).

Source

pub const fn from_u8(v: u8) -> Result<Self, ()>

u8 -> ReasonCode.

§Errors

() wenn Code unbekannt.

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 Debug for ReasonCode

Source§

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

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

impl Display for ReasonCode

Source§

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

Formats the value using the given formatter. Read more
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 (const: unstable) · 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 Copy for ReasonCode

Source§

impl Eq 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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. 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.