Enum lightning::offers::parse::Bolt12SemanticError

source ·
pub enum Bolt12SemanticError {
Show 28 variants AlreadyExpired, UnsupportedChain, UnexpectedChain, MissingAmount, InvalidAmount, InsufficientAmount, UnexpectedAmount, UnsupportedCurrency, UnknownRequiredFeatures, UnexpectedFeatures, MissingDescription, MissingSigningPubkey, InvalidSigningPubkey, UnexpectedSigningPubkey, MissingQuantity, InvalidQuantity, UnexpectedQuantity, InvalidMetadata, UnexpectedMetadata, MissingPayerMetadata, MissingPayerId, DuplicatePaymentId, MissingPaths, UnexpectedPaths, InvalidPayInfo, MissingCreationTime, MissingPaymentHash, MissingSignature,
}
Expand description

Error when interpreting a TLV stream as a specific type.

Variants§

§

AlreadyExpired

The current std::time::SystemTime is past the offer or invoice’s expiration.

§

UnsupportedChain

The provided chain hash does not correspond to a supported chain.

§

UnexpectedChain

A chain was provided but was not expected.

§

MissingAmount

An amount was expected but was missing.

§

InvalidAmount

The amount exceeded the total bitcoin supply.

§

InsufficientAmount

An amount was provided but was not sufficient in value.

§

UnexpectedAmount

An amount was provided but was not expected.

§

UnsupportedCurrency

A currency was provided that is not supported.

§

UnknownRequiredFeatures

A feature was required but is unknown.

§

UnexpectedFeatures

Features were provided but were not expected.

§

MissingDescription

A required description was not provided.

§

MissingSigningPubkey

A signing pubkey was not provided.

§

InvalidSigningPubkey

A signing pubkey was provided but a different one was expected.

§

UnexpectedSigningPubkey

A signing pubkey was provided but was not expected.

§

MissingQuantity

A quantity was expected but was missing.

§

InvalidQuantity

An unsupported quantity was provided.

§

UnexpectedQuantity

A quantity or quantity bounds was provided but was not expected.

§

InvalidMetadata

Metadata could not be used to verify the offers message.

§

UnexpectedMetadata

Metadata was provided but was not expected.

§

MissingPayerMetadata

Payer metadata was expected but was missing.

§

MissingPayerId

A payer id was expected but was missing.

§

DuplicatePaymentId

The payment id for a refund or request is already in use.

§

MissingPaths

Blinded paths were expected but were missing.

§

UnexpectedPaths

Blinded paths were provided but were not expected.

§

InvalidPayInfo

The blinded payinfo given does not match the number of blinded path hops.

§

MissingCreationTime

An invoice creation time was expected but was missing.

§

MissingPaymentHash

An invoice payment hash was expected but was missing.

§

MissingSignature

A signature was expected but was missing.

Trait Implementations§

source§

impl Clone for Bolt12SemanticError

source§

fn clone(&self) -> Bolt12SemanticError

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Bolt12SemanticError

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<Bolt12SemanticError> for Bolt12ParseError

source§

fn from(error: Bolt12SemanticError) -> Self

Converts to this type from the input type.
source§

impl From<Bolt12SemanticError> for InvoiceError

source§

fn from(error: Bolt12SemanticError) -> Self

Converts to this type from the input type.
source§

impl PartialEq for Bolt12SemanticError

source§

fn eq(&self, other: &Bolt12SemanticError) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl StructuralPartialEq for Bolt12SemanticError

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.