Enum lightning_invoice::ParseError
source · pub enum ParseError {
Show 18 variants
Bech32Error(Error),
ParseAmountError(ParseIntError),
MalformedSignature(Error),
BadPrefix,
UnknownCurrency,
UnknownSiPrefix,
MalformedHRP,
TooShortDataPart,
UnexpectedEndOfTaggedFields,
DescriptionDecodeError(Utf8Error),
PaddingError,
IntegerOverflowError,
InvalidSegWitProgramLength,
InvalidPubKeyHashLength,
InvalidScriptHashLength,
InvalidRecoveryId,
InvalidSliceLength(String),
Skip,
}
Expand description
Errors that indicate what is wrong with the invoice. They have some granularity for debug reasons, but should generally result in an “invalid BOLT11 invoice” message for the user.
Variants§
Bech32Error(Error)
ParseAmountError(ParseIntError)
MalformedSignature(Error)
BadPrefix
UnknownCurrency
UnknownSiPrefix
MalformedHRP
TooShortDataPart
UnexpectedEndOfTaggedFields
DescriptionDecodeError(Utf8Error)
PaddingError
IntegerOverflowError
InvalidSegWitProgramLength
InvalidPubKeyHashLength
InvalidScriptHashLength
InvalidRecoveryId
InvalidSliceLength(String)
Skip
Not an error, but used internally to signal that a part of the invoice should be ignored according to BOLT11
Trait Implementations§
source§impl Clone for ParseError
impl Clone for ParseError
source§fn clone(&self) -> ParseError
fn clone(&self) -> ParseError
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 ParseError
impl Debug for ParseError
source§impl Display for ParseError
impl Display for ParseError
source§impl Error for ParseError
Available on crate feature std
only.
impl Error for ParseError
Available on crate feature
std
only.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 From<Error> for ParseError
impl From<Error> for ParseError
source§impl From<Error> for ParseError
impl From<Error> for ParseError
source§impl From<ParseError> for ParseOrSemanticError
impl From<ParseError> for ParseOrSemanticError
source§fn from(e: ParseError) -> Self
fn from(e: ParseError) -> Self
Converts to this type from the input type.
source§impl From<ParseIntError> for ParseError
impl From<ParseIntError> for ParseError
source§fn from(e: ParseIntError) -> Self
fn from(e: ParseIntError) -> Self
Converts to this type from the input type.