#[non_exhaustive]pub enum PaymentOption {
AttachedCycles {
fee: Option<TokenAmount>,
},
CallerPaysIcrc2Cycles {
fee: Option<TokenAmount>,
},
PatronPaysIcrc2Cycles {
fee: Option<TokenAmount>,
},
}Expand description
Billing options that may be offered to a customer.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
AttachedCycles
The caller is paying with cycles attached to the call.
Note: This is available to inter-canister aclls only; not to ingress messages.
Note: The API does not require additional arguments to support this payment type.
Fields
§
fee: Option<TokenAmount>CallerPaysIcrc2Cycles
The caller is paying with cycles from their main account on the cycles ledger.
Fields
§
fee: Option<TokenAmount>PatronPaysIcrc2Cycles
A patron is paying, on behalf of the caller, from their main account on the cycles ledger.
Fields
§
fee: Option<TokenAmount>Trait Implementations§
Source§impl CandidType for PaymentOption
impl CandidType for PaymentOption
Source§impl Clone for PaymentOption
impl Clone for PaymentOption
Source§fn clone(&self) -> PaymentOption
fn clone(&self) -> PaymentOption
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PaymentOption
impl Debug for PaymentOption
Source§impl<'de> Deserialize<'de> for PaymentOption
impl<'de> Deserialize<'de> for PaymentOption
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 PartialEq for PaymentOption
impl PartialEq for PaymentOption
impl Copy for PaymentOption
impl Eq for PaymentOption
impl StructuralPartialEq for PaymentOption
Auto Trait Implementations§
impl Freeze for PaymentOption
impl RefUnwindSafe for PaymentOption
impl Send for PaymentOption
impl Sync for PaymentOption
impl Unpin for PaymentOption
impl UnwindSafe for PaymentOption
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