pub enum TlvError {
Order {
read: u64,
max: u64,
},
Len {
expected: u64,
actual: u64,
},
Repeated(u64),
UnknownEvenType(u64),
}
Expand description
Possible errors during TLV extension encoding and decoding process
Variants§
Order
deterministic order of TLV records is broken: type {read} follows after type {max}
Fields
Len
incorrect length of TLV record value: expected {expected}, but only {actual} bytes read
Fields
Repeated(u64)
repeated TLV record with id {0}
UnknownEvenType(u64)
an unknown even TLV type {0}
Trait Implementations§
Source§impl Error for TlvError
impl Error for TlvError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl Ord for TlvError
impl Ord for TlvError
Source§impl PartialOrd for TlvError
impl PartialOrd for TlvError
impl Eq for TlvError
impl StructuralPartialEq for TlvError
Auto Trait Implementations§
impl Freeze for TlvError
impl RefUnwindSafe for TlvError
impl Send for TlvError
impl Sync for TlvError
impl Unpin for TlvError
impl UnwindSafe for TlvError
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