Enum strict_encoding::TlvError
source · 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
Fields
deterministic order of TLV records is broken: type {read} follows after type {max}
Len
Fields
incorrect length of TLV record value: expected {expected}, but only {actual} bytes read
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)>
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 PartialEq<TlvError> for TlvError
impl PartialEq<TlvError> for TlvError
source§impl PartialOrd<TlvError> for TlvError
impl PartialOrd<TlvError> for TlvError
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read more