pub enum MeltQuoteResponse<Q> {
Bolt11(MeltQuoteBolt11Response<Q>),
Bolt12(MeltQuoteBolt12Response<Q>),
Custom((PaymentMethod, MeltQuoteCustomResponse<Q>)),
}Expand description
Unified melt quote response for all payment methods
Variants§
Bolt11(MeltQuoteBolt11Response<Q>)
Bolt11 (Lightning invoice)
Bolt12(MeltQuoteBolt12Response<Q>)
Bolt12 (Offers)
Custom((PaymentMethod, MeltQuoteCustomResponse<Q>))
Custom payment method
Implementations§
Source§impl<Q> MeltQuoteResponse<Q>
impl<Q> MeltQuoteResponse<Q>
Sourcepub fn method(&self) -> PaymentMethod
pub fn method(&self) -> PaymentMethod
Returns the payment method for this response.
Sourcepub fn fee_reserve(&self) -> Amount
pub fn fee_reserve(&self) -> Amount
Returns the fee reserve.
Sourcepub fn state(&self) -> MeltQuoteState
pub fn state(&self) -> MeltQuoteState
Returns the quote state.
Sourcepub fn payment_preimage(&self) -> Option<&str>
pub fn payment_preimage(&self) -> Option<&str>
Returns the payment preimage.
Sourcepub fn change(&self) -> Option<&Vec<BlindSignature>>
pub fn change(&self) -> Option<&Vec<BlindSignature>>
Returns the change signatures when present.
Sourcepub fn unit(&self) -> Option<CurrencyUnit>
pub fn unit(&self) -> Option<CurrencyUnit>
Returns the unit when present.
Trait Implementations§
Source§impl<Q: Clone> Clone for MeltQuoteResponse<Q>
impl<Q: Clone> Clone for MeltQuoteResponse<Q>
Source§fn clone(&self) -> MeltQuoteResponse<Q>
fn clone(&self) -> MeltQuoteResponse<Q>
Returns a duplicate 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<Q: Debug> Debug for MeltQuoteResponse<Q>
impl<Q: Debug> Debug for MeltQuoteResponse<Q>
Source§impl<'de, Q> Deserialize<'de> for MeltQuoteResponse<Q>where
Q: Serialize + DeserializeOwned,
impl<'de, Q> Deserialize<'de> for MeltQuoteResponse<Q>where
Q: Serialize + DeserializeOwned,
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
Source§impl<Q: PartialEq> PartialEq for MeltQuoteResponse<Q>
impl<Q: PartialEq> PartialEq for MeltQuoteResponse<Q>
Source§impl<Q> Serialize for MeltQuoteResponse<Q>where
Q: Serialize + DeserializeOwned,
impl<Q> Serialize for MeltQuoteResponse<Q>where
Q: Serialize + DeserializeOwned,
impl<Q: Eq> Eq for MeltQuoteResponse<Q>
impl<Q> StructuralPartialEq for MeltQuoteResponse<Q>
Auto Trait Implementations§
impl<Q> Freeze for MeltQuoteResponse<Q>where
Q: Freeze,
impl<Q> RefUnwindSafe for MeltQuoteResponse<Q>where
Q: RefUnwindSafe,
impl<Q> Send for MeltQuoteResponse<Q>where
Q: Send,
impl<Q> Sync for MeltQuoteResponse<Q>where
Q: Sync,
impl<Q> Unpin for MeltQuoteResponse<Q>where
Q: Unpin,
impl<Q> UnsafeUnpin for MeltQuoteResponse<Q>where
Q: UnsafeUnpin,
impl<Q> UnwindSafe for MeltQuoteResponse<Q>where
Q: UnwindSafe,
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