pub enum Invoice {
Bolt11(Bolt11Invoice),
Bolt12(Bolt12Invoice),
}
Expand description
A BOLT11 or BOLT12 invoice
Variants§
Bolt11(Bolt11Invoice)
A BOLT11 Invoice and its raw invoice hash
Bolt12(Bolt12Invoice)
A BOLT12 Invoice
Trait Implementations§
Source§impl InvoiceAttributes for Invoice
impl InvoiceAttributes for Invoice
Source§fn invoice_hash(&self) -> [u8; 32]
fn invoice_hash(&self) -> [u8; 32]
The hash of the invoice, as a unique ID
Source§fn payment_hash(&self) -> PaymentHash
fn payment_hash(&self) -> PaymentHash
The payment hash of the invoice
Source§fn amount_milli_satoshis(&self) -> u64
fn amount_milli_satoshis(&self) -> u64
Invoiced amount
Source§fn description(&self) -> Option<String>
fn description(&self) -> Option<String>
Description
Source§fn payee_pub_key(&self) -> PublicKey
fn payee_pub_key(&self) -> PublicKey
Payee’s public key
Source§fn duration_since_epoch(&self) -> Duration
fn duration_since_epoch(&self) -> Duration
Timestamp of the payment, as duration since the UNIX epoch
Source§fn expiry_duration(&self) -> Duration
fn expiry_duration(&self) -> Duration
Expiry, as duration since the timestamp
Auto Trait Implementations§
impl Freeze for Invoice
impl RefUnwindSafe for Invoice
impl Send for Invoice
impl Sync for Invoice
impl Unpin for Invoice
impl UnwindSafe for Invoice
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§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more