pub enum PaymentMethod {
LightningBolt11(Bolt11Invoice),
LightningBolt12(Offer),
OnChain {
amount: Option<Amount>,
address: Address,
},
}Expand description
A method which can be used to make a payment
Variants§
LightningBolt11(Bolt11Invoice)
A payment using lightning as descibred by the given BOLT 11 invoice.
LightningBolt12(Offer)
A payment using lightning as descibred by the given BOLT 12 offer.
OnChain
A payment directly on-chain to the specified address.
Fields
Implementations§
Source§impl PaymentMethod
impl PaymentMethod
Sourcepub fn amount(&self) -> Option<Amount>
pub fn amount(&self) -> Option<Amount>
The amount this payment method requires payment for.
If None for non-BOLT 12 payments, any amount can be paid.
For Lightning BOLT 12 offers, the requested amount may be denominated in an alternative
currency, requiring currency conversion and negotiatin while paying. In such a case, None
will be returned. See Offer::amount and LDK’s offer payment logic for more info.
Trait Implementations§
Source§impl Debug for PaymentMethod
impl Debug for PaymentMethod
Source§impl PartialEq for PaymentMethod
impl PartialEq for PaymentMethod
impl Eq for PaymentMethod
impl StructuralPartialEq for PaymentMethod
Auto Trait Implementations§
impl Freeze for PaymentMethod
impl RefUnwindSafe for PaymentMethod
impl Send for PaymentMethod
impl Sync for PaymentMethod
impl Unpin 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