Enum lightning_encoding::TlvError [−][src]
pub enum TlvError {
Order {
read: usize,
max: usize,
},
Len {
expected: usize,
actual: usize,
},
Repeated(usize),
UnknownEvenType(usize),
}Expand description
Possible errors during TLV extension encoding and decoding process
Variants
Order
Fields
read: usizeTLV type id read at the current position
max: usizemaximum value of TLV type id read previously
deterministic order of TLV records is broken: type {read} follows after type {max}
Len
Fields
expected: usizeTLV value length encoded in the TLV record
actual: usizeActual remaining length of the TLV stream
incorrect length of TLV record value: expected {expected}, but only {actual} bytes read
Repeated(usize)
Tuple Fields
0: usizerepeated TLV record with id {0}
UnknownEvenType(usize)
Tuple Fields
0: usizean unknown even TLV type {0}
Trait Implementations
This method returns an ordering between self and other values if one exists. Read more
This method tests less than (for self and other) and is used by the < operator. Read more
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
This method tests greater than (for self and other) and is used by the > operator. Read more
Auto Trait Implementations
impl RefUnwindSafe for TlvError
impl UnwindSafe for TlvError
Blanket Implementations
Mutably borrows from an owned value. Read more