Enum lightning::ln::msgs::DecodeError
source · pub enum DecodeError {
UnknownVersion,
UnknownRequiredFeature,
InvalidValue,
ShortRead,
BadLengthDescriptor,
Io(ErrorKind),
UnsupportedCompression,
}
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 onion hop data packet.
UnknownRequiredFeature
Unknown feature mandating we fail to parse message (e.g., TLV with an even, unknown type)
InvalidValue
Value was invalid.
For example, 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, TLV was syntactically incorrect, etc.
ShortRead
The buffer to be read was too short.
BadLengthDescriptor
A length descriptor in the packet didn’t describe the later data correctly.
Io(ErrorKind)
Error from std::io
.
UnsupportedCompression
The message included zlib-compressed values, which we don’t support.
Trait Implementations§
source§impl Clone for DecodeError
impl Clone for DecodeError
source§fn clone(&self) -> DecodeError
fn clone(&self) -> DecodeError
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for DecodeError
impl Debug for DecodeError
source§impl Display for DecodeError
impl Display for DecodeError
source§impl From<DecodeError> for ParseError
impl From<DecodeError> for ParseError
source§fn from(error: DecodeError) -> Self
fn from(error: DecodeError) -> Self
Converts to this type from the input type.
source§impl From<Error> for DecodeError
impl From<Error> for DecodeError
source§impl PartialEq<DecodeError> for DecodeError
impl PartialEq<DecodeError> for DecodeError
source§fn eq(&self, other: &DecodeError) -> bool
fn eq(&self, other: &DecodeError) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.