Enum DecodeError
#[non_exhaustive]pub enum DecodeError {
Show 14 variants
InsufficientData,
MalformedVbi,
InvalidUtf8,
StringContainsNull,
InvalidValue,
InvalidPropertyId,
InvalidFlags,
InvalidProtocol,
LengthMismatch,
InvalidPacketId,
InvalidOpCode,
InvalidQos2Phase,
InvalidTopic,
TooLong,
}Expand description
Errors that can occur during decoding.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
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.
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.
InvalidPacketId
A packet identifier was zero, which is invalid.
InvalidOpCode
An unknown journal operation code was encountered.
InvalidQos2Phase
A QoS 2 phase byte was not a recognised value.
InvalidTopic
A topic name failed validation.
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
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for DecodeError
impl Debug for DecodeError
§impl PartialEq for DecodeError
impl PartialEq for DecodeError
impl Copy for DecodeError
impl Eq for DecodeError
impl StructuralPartialEq for DecodeError
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