Enum DecodeError
#[non_exhaustive]pub enum DecodeError {
Show 14 variants
InsufficientData,
MalformedVbi,
InvalidUtf8,
StringContainsNull,
InvalidValue,
InvalidPropertyId,
DuplicateProperty,
InvalidFlags,
InvalidProtocol,
LengthMismatch,
TrailingBytes,
InvalidPacketId,
InvalidSubscriptionOptions,
TooLong,
}Expand description
Errors that can occur during decoding.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
InsufficientData
Not enough bytes in the buffer.
MalformedVbi
Variable Byte Integer uses more than 4 bytes.
InvalidUtf8
String bytes are not valid UTF-8.
StringContainsNull
A UTF-8 string contains the null character U+0000.
InvalidValue
A reserved or unknown field value was encountered.
InvalidPropertyId
An unknown property identifier was encountered.
DuplicateProperty
A property that may appear at most once was included more than once (Protocol Error, §2.2.2.2).
InvalidFlags
Fixed header flags are wrong for the packet type.
InvalidProtocol
The protocol name or version in CONNECT is wrong.
LengthMismatch
Remaining length does not match actual content.
TrailingBytes
A packet’s defined fields were decoded but unread bytes remain in its body.
InvalidPacketId
A packet identifier was zero, which is invalid.
InvalidSubscriptionOptions
A subscription options byte set reserved bits.
TooLong
A dynamically sized value exceeds the maximum allowed length.
Trait Implementations§
§impl Clone for DecodeError
impl Clone for DecodeError
§fn clone(&self) -> DecodeError
fn clone(&self) -> DecodeError
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more