pub enum Error {
Show 25 variants
InvalidConnectReturnCode(u8),
InvalidPacketType(u8),
InvalidReasonCode(u8),
InvalidProtocolName(String),
InvalidProtocolLevel(u8),
InvalidProperty(u8),
InvalidUtf8,
InvalidQos(u8),
InvalidRetainHandling(u8),
Io(Error),
MalformedVariableByteInteger,
MalformedPacket,
NoCodes,
NotEnoughBytes(usize),
NoTopic,
OutgoingPayloadSizeLimitExceeded(usize),
OutOfBounds,
PayloadTooLarge,
PayloadRequired,
PayloadSizeLimitExceeded(usize),
ProtocolError,
ProtocolMismatch,
ProtocolNotSupported,
PropertyMismatch,
StringTooLong,
}Expand description
Represents errors that can occur when working with the MQTT protocol.
Each variant includes a descriptive error message and, where applicable, additional context (e.g., invalid values or sizes).
Variants§
InvalidConnectReturnCode(u8)
Indicates an invalid connect return code.
InvalidPacketType(u8)
Indicates an invalid packet type.
InvalidReasonCode(u8)
Indicates an invalid reason code.
InvalidProtocolName(String)
Indicates an invalid protocol name.
InvalidProtocolLevel(u8)
Indicates an invalid protocol level.
InvalidProperty(u8)
Indicates an invalid property.
InvalidUtf8
Indicates invalid UTF-8 data.
InvalidQos(u8)
Indicates an invalid QoS level.
InvalidRetainHandling(u8)
Indicates invalid retain handling.
Io(Error)
Wraps an I/O error.
MalformedVariableByteInteger
Indicates a malformed variable byte integer.
MalformedPacket
Indicates a malformed packet.
NoCodes
Indicates that the payload must contain at least one return code.
NotEnoughBytes(usize)
Indicates that there are not enough bytes to frame the packet.
NoTopic
Indicates that the payload must contain at least one topic filter.
OutgoingPayloadSizeLimitExceeded(usize)
Indicates that the outgoing payload size limit has been exceeded.
OutOfBounds
Indicates an out-of-bounds access.
PayloadTooLarge
Indicates that the payload is too large.
PayloadRequired
Indicates that a payload is required but missing.
PayloadSizeLimitExceeded(usize)
Indicates that the payload size limit has been exceeded.
ProtocolError
Indicates a protocol error.
ProtocolMismatch
Indicates a protocol mismatch.
ProtocolNotSupported
Indicates that the protocol is not supported.
PropertyMismatch
Indicates a property mismatch.
StringTooLong
Indicates that a string is too long.