pub enum InvoiceError {
Show 23 variants
Bech32Error(Error),
MoleculeError(VerificationError),
ParseAmountError(ParseIntError),
UnknownCurrency(String),
UnknownSiPrefix(String),
MalformedHRP(String),
TooShortDataPart,
UnexpectedEndOfTaggedFields,
IntegerOverflowError,
InvalidRecoveryId,
InvalidSliceLength(String),
InvalidSignature,
DuplicatedAttributeKey(String),
PaymentSecretRequiredForMpp,
BothPaymenthashAndPreimage,
NeitherPaymenthashNorPreimage,
SignError,
HexDecodeError(FromHexError),
DuplicatedInvoice(String),
DescriptionTooLong(usize),
InvoiceNotFound,
InvoiceAlreadyExists,
DeprecatedAttribute(String),
}Expand description
Errors that can occur when parsing or validating an invoice.
Variants§
Bech32Error(Error)
Bech32 encoding/decoding error.
MoleculeError(VerificationError)
Molecule serialization error.
ParseAmountError(ParseIntError)
Failed to parse amount from HRP.
UnknownCurrency(String)
Unknown currency in HRP.
UnknownSiPrefix(String)
Unknown SI prefix in amount.
MalformedHRP(String)
Malformed HRP.
TooShortDataPart
Data part is too short.
UnexpectedEndOfTaggedFields
Unexpected end of tagged fields.
IntegerOverflowError
Integer overflow error.
InvalidRecoveryId
Invalid recovery ID in signature.
InvalidSliceLength(String)
Invalid slice length.
InvalidSignature
Invalid signature.
DuplicatedAttributeKey(String)
Duplicated attribute key.
PaymentSecretRequiredForMpp
Payment secret is required for MPP payments.
BothPaymenthashAndPreimage
Both payment_hash and payment_preimage are set.
NeitherPaymenthashNorPreimage
Neither payment_hash nor payment_preimage is set.
SignError
An error occurred during signing.
HexDecodeError(FromHexError)
Hex decode error.
DuplicatedInvoice(String)
Duplicated invoice found.
DescriptionTooLong(usize)
Description is too long.
InvoiceNotFound
Invoice not found.
InvoiceAlreadyExists
Invoice already exists.
DeprecatedAttribute(String)
Deprecated attribute.
Trait Implementations§
Source§impl Debug for InvoiceError
impl Debug for InvoiceError
Source§impl Display for InvoiceError
impl Display for InvoiceError
Source§impl Error for InvoiceError
impl Error for InvoiceError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns 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 InvoiceError
impl From<Error> for InvoiceError
Source§impl From<FromHexError> for InvoiceError
impl From<FromHexError> for InvoiceError
Source§fn from(source: FromHexError) -> Self
fn from(source: FromHexError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for InvoiceError
impl PartialEq for InvoiceError
impl StructuralPartialEq for InvoiceError
Auto Trait Implementations§
impl Freeze for InvoiceError
impl RefUnwindSafe for InvoiceError
impl Send for InvoiceError
impl Sync for InvoiceError
impl Unpin for InvoiceError
impl UnsafeUnpin for InvoiceError
impl UnwindSafe for InvoiceError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more