Enum lightning::ln::msgs::DecodeError
source · pub enum DecodeError {
UnknownVersion,
UnknownRequiredFeature,
InvalidValue,
ShortRead,
ExtraAddressesPerType,
BadLengthDescriptor,
Io(Error),
}
Expand description
An error in decoding a message or struct.
Variants
UnknownVersion
A version byte specified something we don’t know how to handle. Includes unknown realm byte in an OnionHopData packet
UnknownRequiredFeature
Unknown feature mandating we fail to parse message
InvalidValue
Value was invalid, eg a byte which was supposed to be a bool was something other than a 0 or 1, a public key/private key/signature was invalid, text wasn’t UTF-8, etc
ShortRead
Buffer too short
ExtraAddressesPerType
node_announcement included more than one address of a given type!
BadLengthDescriptor
A length descriptor in the packet didn’t describe the later data correctly (currently only generated in node_announcement)
Io(Error)
Error from std::io
Trait Implementations
sourceimpl Debug for DecodeError
impl Debug for DecodeError
sourceimpl Display for DecodeError
impl Display for DecodeError
sourceimpl Error for DecodeError
impl Error for DecodeError
sourcefn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
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
Auto Trait Implementations
impl !RefUnwindSafe for DecodeError
impl Send for DecodeError
impl Sync for DecodeError
impl Unpin for DecodeError
impl !UnwindSafe for DecodeError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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