pub enum DecodeError {
Show 20 variants
InvalidClientId,
InvalidPacketType,
InvalidProtocolLevel,
InvalidProtocolName,
InvalidConnectFlags,
InvalidQoS,
InvalidPacketFlags,
InvalidPacketId,
InvalidVarInt,
InvalidBoolData,
InvalidRemainingLength,
InvalidString(StringError),
InvalidTopic(TopicError),
InvalidPropertyType,
InvalidPropertyValue,
InvalidReasonCode,
OutOfRangeError,
TooManyData,
EmptyTopicFilter,
OtherErrors,
}Variants§
InvalidClientId
ClientId is empty or its length exceeds 23. Or contains invalid characters.
InvalidPacketType
InvalidProtocolLevel
Protocol level is not in 3.1, 3.1.1 or 5.0.
InvalidProtocolName
Protocol name must be “MQTT”.
InvalidConnectFlags
Resrved bit in connect packet is not zero.
InvalidQoS
QoS not 0, 1, 2
InvalidPacketFlags
Invalid flag value in fixed header.
Does not contain InvalidQoS.
InvalidPacketId
PacketId should be present but not set. Or PacketId is none where it is required.
InvalidVarInt
Failed to parse variable byte integer.
InvalidBoolData
InvalidRemainingLength
Length of buffer - offset < remaining length.
InvalidString(StringError)
Invalid UTF-8 string.
InvalidTopic(TopicError)
Violate topic filter rules. Topic name might contain wildcard characters.
InvalidPropertyType
Unknown property type bit.
InvalidPropertyValue
Failed to parse property value.
InvalidReasonCode
Used in v5 protocol.
OutOfRangeError
Byte array index ouf of range.
TooManyData
Length of data exceeds its limitation
EmptyTopicFilter
No topic is speicified in Subscribe packet.
OtherErrors
General errors
Trait Implementations§
Source§impl Debug for DecodeError
impl Debug for DecodeError
Source§impl From<ByteArrayError> for DecodeError
impl From<ByteArrayError> for DecodeError
Source§fn from(err: ByteArrayError) -> Self
fn from(err: ByteArrayError) -> Self
Converts to this type from the input type.
Source§impl From<StringError> for DecodeError
impl From<StringError> for DecodeError
Source§fn from(err: StringError) -> Self
fn from(err: StringError) -> Self
Converts to this type from the input type.
Source§impl From<TopicError> for DecodeError
impl From<TopicError> for DecodeError
Source§fn from(err: TopicError) -> Self
fn from(err: TopicError) -> Self
Converts to this type from the input type.
Source§impl From<VarIntError> for DecodeError
impl From<VarIntError> for DecodeError
Source§fn from(_err: VarIntError) -> Self
fn from(_err: VarIntError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for DecodeError
impl RefUnwindSafe for DecodeError
impl Send for DecodeError
impl Sync for DecodeError
impl Unpin for DecodeError
impl UnwindSafe for DecodeError
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