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
sourceimpl Clone for SemanticError
impl Clone for SemanticError
sourcefn clone(&self) -> SemanticError
fn clone(&self) -> SemanticError
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for SemanticError
impl Debug for SemanticError
sourceimpl Display for SemanticError
impl Display for SemanticError
sourceimpl Error for SemanticError
This is supported on crate feature std
only.
impl Error for SemanticError
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
sourcefn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
backtrace
)Returns a stack backtrace, if available, of where this error occurred. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
sourceimpl From<SemanticError> for ParseOrSemanticError
impl From<SemanticError> for ParseOrSemanticError
sourcefn from(e: SemanticError) -> Self
fn from(e: SemanticError) -> Self
Performs the conversion.
sourceimpl PartialEq<SemanticError> for SemanticError
impl PartialEq<SemanticError> for SemanticError
impl Eq for SemanticError
impl StructuralEq for SemanticError
impl StructuralPartialEq for SemanticError
Auto Trait Implementations
impl RefUnwindSafe for SemanticError
impl Send for SemanticError
impl Sync for SemanticError
impl Unpin for SemanticError
impl UnwindSafe for SemanticError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more