Enum lightning_invoice::SemanticError
source · pub enum SemanticError {
NoPaymentHash,
MultiplePaymentHashes,
NoDescription,
MultipleDescriptions,
NoPaymentSecret,
MultiplePaymentSecrets,
InvalidFeatures,
InvalidRecoveryId,
InvalidSignature,
ImpreciseAmount,
}
Expand description
Errors that may occur when converting a RawInvoice
to an Invoice
. They relate to the
requirements sections in BOLT #11
Variants§
NoPaymentHash
The invoice is missing the mandatory payment hash
MultiplePaymentHashes
The invoice has multiple payment hashes which isn’t allowed
NoDescription
No description or description hash are part of the invoice
MultipleDescriptions
The invoice contains multiple descriptions and/or description hashes which isn’t allowed
NoPaymentSecret
The invoice is missing the mandatory payment secret, which all modern lightning nodes should provide.
MultiplePaymentSecrets
The invoice contains multiple payment secrets
InvalidFeatures
The invoice’s features are invalid
InvalidRecoveryId
The recovery id doesn’t fit the signature/pub key
InvalidSignature
The invoice’s signature is invalid
ImpreciseAmount
The invoice’s amount was not a whole number of millisatoshis
Trait Implementations§
source§impl Clone for SemanticError
impl Clone for SemanticError
source§fn clone(&self) -> SemanticError
fn clone(&self) -> SemanticError
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 SemanticError
impl Debug for SemanticError
source§impl Display for SemanticError
impl Display for SemanticError
source§impl Error for SemanticError
Available on crate feature std
only.
impl Error for SemanticError
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<SemanticError> for ParseOrSemanticError
impl From<SemanticError> for ParseOrSemanticError
source§fn from(e: SemanticError) -> Self
fn from(e: SemanticError) -> Self
Converts to this type from the input type.