pub enum NotificationPayload<T>where
T: Clone,{
ProofState(ProofState),
MintQuoteOnchainResponse(MintQuoteOnchainResponse<T>),
MeltQuoteOnchainResponse(MeltQuoteOnchainResponse<T>),
MeltQuoteBolt11Response(MeltQuoteBolt11Response<T>),
MintQuoteBolt11Response(MintQuoteBolt11Response<T>),
MintQuoteBolt12Response(MintQuoteBolt12Response<T>),
MeltQuoteBolt12Response(MeltQuoteBolt11Response<T>),
CustomMintQuoteResponse(String, MintQuoteCustomResponse<T>),
CustomMeltQuoteResponse(String, MeltQuoteCustomResponse<T>),
}Expand description
Subscription response
Note on variant ordering: serde untagged deserialization tries variants
in declaration order and selects the first that matches. The Onchain
variants are declared before the Bolt11/Bolt12 variants because the
Onchain response structs use #[serde(deny_unknown_fields)], which makes
them reject Bolt11/Bolt12 payloads cleanly. Placing them first ensures
onchain payloads are classified correctly without being consumed by the
more permissive Bolt12 variant (which carries a superset of Onchain’s
field names).
Variants§
ProofState(ProofState)
Proof State
MintQuoteOnchainResponse(MintQuoteOnchainResponse<T>)
Mint Quote Onchain Response
Declared before MintQuoteBolt12Response to ensure untagged
discrimination picks the onchain variant for onchain payloads.
MeltQuoteOnchainResponse(MeltQuoteOnchainResponse<T>)
Melt Quote Onchain Response
Declared before MeltQuoteBolt11Response/MeltQuoteBolt12Response
for the same reason.
MeltQuoteBolt11Response(MeltQuoteBolt11Response<T>)
Melt Quote Bolt11 Response
MintQuoteBolt11Response(MintQuoteBolt11Response<T>)
Mint Quote Bolt11 Response
MintQuoteBolt12Response(MintQuoteBolt12Response<T>)
Mint Quote Bolt12 Response
MeltQuoteBolt12Response(MeltQuoteBolt11Response<T>)
Melt Quote Bolt12 Response
CustomMintQuoteResponse(String, MintQuoteCustomResponse<T>)
Custom Mint Quote Response (method, response)
CustomMeltQuoteResponse(String, MeltQuoteCustomResponse<T>)
Custom Melt Quote Response (method, response)
Trait Implementations§
Source§impl<T> Clone for NotificationPayload<T>where
T: Clone,
impl<T> Clone for NotificationPayload<T>where
T: Clone,
Source§fn clone(&self) -> NotificationPayload<T>
fn clone(&self) -> NotificationPayload<T>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<T> Debug for NotificationPayload<T>
impl<T> Debug for NotificationPayload<T>
Source§impl<'de, T> Deserialize<'de> for NotificationPayload<T>
impl<'de, T> Deserialize<'de> for NotificationPayload<T>
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<NotificationPayload<T>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<NotificationPayload<T>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl<T> Eq for NotificationPayload<T>
Source§impl<T> From<MeltQuoteBolt11Response<T>> for NotificationPayload<T>where
T: Clone,
impl<T> From<MeltQuoteBolt11Response<T>> for NotificationPayload<T>where
T: Clone,
Source§fn from(melt_quote: MeltQuoteBolt11Response<T>) -> NotificationPayload<T>
fn from(melt_quote: MeltQuoteBolt11Response<T>) -> NotificationPayload<T>
Source§impl<T> From<MintQuoteBolt12Response<T>> for NotificationPayload<T>where
T: Clone,
impl<T> From<MintQuoteBolt12Response<T>> for NotificationPayload<T>where
T: Clone,
Source§fn from(mint_quote: MintQuoteBolt12Response<T>) -> NotificationPayload<T>
fn from(mint_quote: MintQuoteBolt12Response<T>) -> NotificationPayload<T>
Source§impl<T> PartialEq for NotificationPayload<T>
impl<T> PartialEq for NotificationPayload<T>
Source§fn eq(&self, other: &NotificationPayload<T>) -> bool
fn eq(&self, other: &NotificationPayload<T>) -> bool
self and other values to be equal, and is used by ==.