Enum mqttrust_core::encoding::v4::Error [−][src]
pub enum Error {
WriteZero,
InvalidPid(u16),
InvalidQos(u8),
InvalidConnectReturnCode(u8),
InvalidProtocol(String<10_usize>, u8),
InvalidHeader,
InvalidLength,
InvalidString,
}
Variants
Not enough space in the write buffer.
It is the caller’s responsiblity to pass a big enough buffer to encode()
.
InvalidPid(u16)
Tried to encode or decode a ProcessIdentifier==0.
Tuple Fields of InvalidPid
0: u16
InvalidQos(u8)
Tried to decode a QoS > 2.
Tuple Fields of InvalidQos
0: u8
InvalidConnectReturnCode(u8)
Tried to decode a ConnectReturnCode > 5.
Tuple Fields of InvalidConnectReturnCode
0: u8
Tried to decode an unknown protocol.
Tried to decode an invalid fixed header (packet type, flags, or remaining_length).
Trying to encode/decode an invalid length.
The difference with WriteZero
/UnexpectedEof
is that it refers to an invalid/corrupt
length rather than a buffer size issue.
Trying to decode a non-utf8 string.