pub enum MqttError {
Show 18 variants
Handshake(HandshakeError),
Protocol(ProtocolError),
Decode(DecodeError),
Encode(EncodeError),
SendPacket(SendPacketError),
ReadTimeout,
WriteTimeout,
FlushTimeout,
CloseTimeout,
PublishAckReason(PublishAckReason, ByteString),
ServiceUnavailable,
InvalidProtocol,
TooManySubscriptions,
TooManyTopicLevels,
SubscribeLimited(String),
IdentifierRejected,
PacketIdInUse(NonZeroU16),
None,
}
Expand description
Error types for MQTT operations
Variants§
Handshake(HandshakeError)
Handshake error
Protocol(ProtocolError)
Decode(DecodeError)
MQTT decoding error
Encode(EncodeError)
MQTT encoding error
SendPacket(SendPacketError)
Send packet error
ReadTimeout
Read timeout
WriteTimeout
Write timeout
FlushTimeout
Flush timeout
CloseTimeout
Close timeout
PublishAckReason(PublishAckReason, ByteString)
InvalidProtocol
TooManySubscriptions
TooManyTopicLevels
SubscribeLimited(String)
IdentifierRejected
PacketIdInUse(NonZeroU16)
None
Trait Implementations§
Source§impl<'de> Deserialize<'de> for MqttError
impl<'de> Deserialize<'de> for MqttError
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Error for MqttError
impl Error for MqttError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<DecodeError> for MqttError
impl From<DecodeError> for MqttError
Source§fn from(source: DecodeError) -> Self
fn from(source: DecodeError) -> Self
Converts to this type from the input type.
Source§impl From<EncodeError> for MqttError
impl From<EncodeError> for MqttError
Source§fn from(source: EncodeError) -> Self
fn from(source: EncodeError) -> Self
Converts to this type from the input type.
Source§impl From<HandshakeError> for MqttError
impl From<HandshakeError> for MqttError
Source§fn from(source: HandshakeError) -> Self
fn from(source: HandshakeError) -> Self
Converts to this type from the input type.
Source§impl From<ProtocolError> for MqttError
impl From<ProtocolError> for MqttError
Source§fn from(source: ProtocolError) -> Self
fn from(source: ProtocolError) -> Self
Converts to this type from the input type.
Source§impl From<SendPacketError> for MqttError
impl From<SendPacketError> for MqttError
Source§fn from(source: SendPacketError) -> Self
fn from(source: SendPacketError) -> Self
Converts to this type from the input type.
Source§impl ToReasonCode for MqttError
impl ToReasonCode for MqttError
fn to_reason_code(&self) -> DisconnectReasonCode
Auto Trait Implementations§
impl !Freeze for MqttError
impl RefUnwindSafe for MqttError
impl Send for MqttError
impl Sync for MqttError
impl Unpin for MqttError
impl UnwindSafe for MqttError
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