pub enum InvoiceError {
Show 28 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),
DecompressionError(String),
InvoiceDataTooLong {
len: usize,
max: usize,
},
InvalidUtf8Attribute(&'static str),
InvalidPayeePublicKey,
InvalidSignatureEncoding,
}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.
DecompressionError(String)
Failed to decompress invoice data.
InvoiceDataTooLong
Decompressed invoice data exceeds the parser limit.
InvalidUtf8Attribute(&'static str)
Invoice text attribute is not valid UTF-8.
InvalidPayeePublicKey
Invoice payee public key is malformed.
InvalidSignatureEncoding
Invoice signature contains malformed base32 data.
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)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
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
Source§impl PartialEq for InvoiceError
impl PartialEq for InvoiceError
Source§fn eq(&self, other: &InvoiceError) -> bool
fn eq(&self, other: &InvoiceError) -> bool
self and other values to be equal, and is used by ==.