pub enum Bolt11SemanticError {
NoPaymentHash,
MultiplePaymentHashes,
NoDescription,
MultipleDescriptions,
NoPaymentSecret,
MultiplePaymentSecrets,
InvalidFeatures,
InvalidRecoveryId,
InvalidSignature,
ImpreciseAmount,
}
Expand description
Errors that may occur when converting a RawBolt11Invoice
to a Bolt11Invoice
. 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 Bolt11SemanticError
impl Clone for Bolt11SemanticError
source§fn clone(&self) -> Bolt11SemanticError
fn clone(&self) -> Bolt11SemanticError
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 Bolt11SemanticError
impl Debug for Bolt11SemanticError
source§impl Display for Bolt11SemanticError
impl Display for Bolt11SemanticError
source§impl Error for Bolt11SemanticError
Available on crate feature std
only.
impl Error for Bolt11SemanticError
Available on crate feature
std
only.1.30.0 · 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<Bolt11SemanticError> for ParseOrSemanticError
impl From<Bolt11SemanticError> for ParseOrSemanticError
source§fn from(e: Bolt11SemanticError) -> Self
fn from(e: Bolt11SemanticError) -> Self
Converts to this type from the input type.
source§impl PartialEq for Bolt11SemanticError
impl PartialEq for Bolt11SemanticError
impl Eq for Bolt11SemanticError
impl StructuralPartialEq for Bolt11SemanticError
Auto Trait Implementations§
impl Freeze for Bolt11SemanticError
impl RefUnwindSafe for Bolt11SemanticError
impl Send for Bolt11SemanticError
impl Sync for Bolt11SemanticError
impl Unpin for Bolt11SemanticError
impl UnwindSafe for Bolt11SemanticError
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)