pub struct OfferWithAmount {
pub offer: Offer,
pub bip321_amount: Option<Amount>,
}Expand description
An offer payment method with optional amount from a BIP321 URI.
Fields§
§offer: Offer§bip321_amount: Option<Amount>Amount from BIP321 URI. Used when the offer is amount-less to pre-fill an amount in the UI.
Implementations§
Source§impl OfferWithAmount
impl OfferWithAmount
Sourcepub fn prompt_amount(&self) -> Option<Amount>
pub fn prompt_amount(&self) -> Option<Amount>
The amount that we should prompt the user with. Returns the offer’s embedded amount if present, otherwise uses the BIP321 URI amount.
pub fn supports_network(&self, network: Network) -> bool
pub fn no_bip321_amount(offer: Offer) -> OfferWithAmount
Auto Trait Implementations§
impl Freeze for OfferWithAmount
impl RefUnwindSafe for OfferWithAmount
impl Send for OfferWithAmount
impl Sync for OfferWithAmount
impl Unpin for OfferWithAmount
impl UnsafeUnpin for OfferWithAmount
impl UnwindSafe for OfferWithAmount
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