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
sourceimpl Clone for ParseError
impl Clone for ParseError
sourcefn clone(&self) -> ParseError
fn clone(&self) -> ParseError
Returns a copy of the value. Read more
1.0.0 · sourceconst fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for ParseError
impl Debug for ParseError
sourceimpl Display for ParseError
impl Display for ParseError
sourceimpl Error for ParseError
Available on crate feature std
only.
impl Error for ParseError
Available on crate feature
std
only.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
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
sourceimpl From<Error> for ParseError
impl From<Error> for ParseError
sourceimpl From<Error> for ParseError
impl From<Error> for ParseError
sourceimpl From<ParseError> for ParseOrSemanticError
impl From<ParseError> for ParseOrSemanticError
sourcefn from(e: ParseError) -> Self
fn from(e: ParseError) -> Self
Converts to this type from the input type.
sourceimpl From<ParseIntError> for ParseError
impl From<ParseIntError> for ParseError
sourcefn from(e: ParseIntError) -> Self
fn from(e: ParseIntError) -> Self
Converts to this type from the input type.
sourceimpl From<Utf8Error> for ParseError
impl From<Utf8Error> for ParseError
sourceimpl PartialEq<ParseError> for ParseError
impl PartialEq<ParseError> for ParseError
sourcefn eq(&self, other: &ParseError) -> bool
fn eq(&self, other: &ParseError) -> bool
impl Eq for ParseError
impl StructuralEq for ParseError
impl StructuralPartialEq for ParseError
Auto Trait Implementations
impl RefUnwindSafe for ParseError
impl Send for ParseError
impl Sync for ParseError
impl Unpin for ParseError
impl UnwindSafe for ParseError
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