pub struct CreateInvoiceResponse {
pub index: PaymentCreatedIndex,
pub invoice: Invoice,
pub description: Option<String>,
pub amount: Option<Amount>,
pub created_at: TimestampMs,
pub expires_at: TimestampMs,
pub payment_hash: PaymentHash,
pub payment_secret: PaymentSecret,
}Expand description
The response to a BOLT 11 invoice request.
Fields§
§index: PaymentCreatedIndexIdentifier for this inbound invoice payment.
invoice: InvoiceThe string-encoded BOLT 11 invoice.
description: Option<String>The description encoded in the invoice, if one was provided.
amount: Option<Amount>The amount encoded in the invoice, if there was one.
Returning null means we created an amountless invoice.
created_at: TimestampMsThe invoice creation time, in milliseconds since the UNIX epoch.
expires_at: TimestampMsThe invoice expiration time, in milliseconds since the UNIX epoch.
payment_hash: PaymentHashThe hex-encoded payment hash of the invoice.
payment_secret: PaymentSecretThe payment secret of the invoice.
Implementations§
Source§impl CreateInvoiceResponse
impl CreateInvoiceResponse
Sourcepub fn new(index: PaymentCreatedIndex, invoice: Invoice) -> Self
pub fn new(index: PaymentCreatedIndex, invoice: Invoice) -> Self
Build a CreateInvoiceResponse from an index and invoice.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for CreateInvoiceResponse
impl<'de> Deserialize<'de> for CreateInvoiceResponse
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for CreateInvoiceResponse
impl RefUnwindSafe for CreateInvoiceResponse
impl Send for CreateInvoiceResponse
impl Sync for CreateInvoiceResponse
impl Unpin for CreateInvoiceResponse
impl UnwindSafe for CreateInvoiceResponse
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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