Enum lightning_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
read: u64
TLV type id read at the current position
max: u64
maximum value of TLV type id read previously
deterministic order of TLV records is broken: type {read} follows after type {max}
Len
Fields
expected: u64
TLV value length encoded in the TLV record
actual: u64
Actual remaining length of the TLV stream
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
sourceimpl Error for TlvError
impl Error for TlvError
1.30.0 · sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
sourcefn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
backtrace
)Returns a stack backtrace, if available, of where this error occurred. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
sourceimpl Ord for TlvError
impl Ord for TlvError
sourceimpl PartialOrd<TlvError> for TlvError
impl PartialOrd<TlvError> for TlvError
sourcefn partial_cmp(&self, other: &TlvError) -> Option<Ordering>
fn partial_cmp(&self, other: &TlvError) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn 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
impl Eq for TlvError
impl StructuralEq for TlvError
impl StructuralPartialEq for TlvError
Auto Trait Implementations
impl RefUnwindSafe for TlvError
impl Send for TlvError
impl Sync for TlvError
impl Unpin for TlvError
impl UnwindSafe for TlvError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more