pub enum MintQuoteResponse<Q> {
Bolt11(MintQuoteBolt11Response<Q>),
Bolt12(MintQuoteBolt12Response<Q>),
Custom((PaymentMethod, MintQuoteCustomResponse<Q>)),
}Expand description
Unified mint quote response for all payment methods
Variants§
Bolt11(MintQuoteBolt11Response<Q>)
Bolt11 (Lightning invoice)
Bolt12(MintQuoteBolt12Response<Q>)
Bolt12 (Offers)
Custom((PaymentMethod, MintQuoteCustomResponse<Q>))
Custom payment method
Implementations§
Source§impl<Q> MintQuoteResponse<Q>
impl<Q> MintQuoteResponse<Q>
Sourcepub fn method(&self) -> PaymentMethod
pub fn method(&self) -> PaymentMethod
Returns the payment method for this response.
Sourcepub fn state(&self) -> QuoteState
pub fn state(&self) -> QuoteState
Returns the quote state.
Trait Implementations§
Source§impl<Q: Clone> Clone for MintQuoteResponse<Q>
impl<Q: Clone> Clone for MintQuoteResponse<Q>
Source§fn clone(&self) -> MintQuoteResponse<Q>
fn clone(&self) -> MintQuoteResponse<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 MintQuoteResponse<Q>
impl<Q: Debug> Debug for MintQuoteResponse<Q>
Source§impl<'de, Q> Deserialize<'de> for MintQuoteResponse<Q>where
Q: Serialize + DeserializeOwned,
impl<'de, Q> Deserialize<'de> for MintQuoteResponse<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 From<MintQuoteResponse<QuoteId>> for MintQuoteBolt11Response<String>
impl From<MintQuoteResponse<QuoteId>> for MintQuoteBolt11Response<String>
Source§fn from(response: MintQuoteResponse<QuoteId>) -> Self
fn from(response: MintQuoteResponse<QuoteId>) -> Self
Converts to this type from the input type.
Source§impl<Q> Serialize for MintQuoteResponse<Q>where
Q: Serialize + DeserializeOwned,
impl<Q> Serialize for MintQuoteResponse<Q>where
Q: Serialize + DeserializeOwned,
Auto Trait Implementations§
impl<Q> Freeze for MintQuoteResponse<Q>where
Q: Freeze,
impl<Q> RefUnwindSafe for MintQuoteResponse<Q>where
Q: RefUnwindSafe,
impl<Q> Send for MintQuoteResponse<Q>where
Q: Send,
impl<Q> Sync for MintQuoteResponse<Q>where
Q: Sync,
impl<Q> Unpin for MintQuoteResponse<Q>where
Q: Unpin,
impl<Q> UnsafeUnpin for MintQuoteResponse<Q>where
Q: UnsafeUnpin,
impl<Q> UnwindSafe for MintQuoteResponse<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