pub enum PaymentMethod {
Onchain(Onchain),
Invoice(Invoice),
Offer(OfferWithAmount),
LnurlPayRequest(LnurlPayRequest),
}Expand description
A single “payment method” – each kind here should correspond with a single linear payment flow for a user, where there are no other alternate methods.
For example, a Unified BTC QR code contains a single BIP321 URI, which may contain multiple discrete payment methods (an onchain address, a BOLT11 invoice, a BOLT12 offer).
Variants§
Implementations§
Source§impl PaymentMethod
impl PaymentMethod
pub fn is_onchain(&self) -> bool
pub fn is_invoice(&self) -> bool
pub fn is_offer(&self) -> bool
pub fn supports_network(&self, network: Network) -> bool
Auto Trait Implementations§
impl Freeze for PaymentMethod
impl RefUnwindSafe for PaymentMethod
impl Send for PaymentMethod
impl Sync for PaymentMethod
impl Unpin for PaymentMethod
impl UnsafeUnpin for PaymentMethod
impl UnwindSafe for PaymentMethod
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