#[non_exhaustive]pub enum PaymentType {
AttachedCycles,
CallerPaysIcrc2Cycles,
PatronPaysIcrc2Cycles(PatronPaysIcrc2Cycles),
CallerPaysIcrc2Tokens(CallerPaysIcrc2Tokens),
PatronPaysIcrc2Tokens(PatronPaysIcrc2Tokens),
}Expand description
How a caller states that they will pay.
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.
CallerPaysIcrc2Cycles
The caller is paying with cycles from their main account on the cycles ledger.
PatronPaysIcrc2Cycles(PatronPaysIcrc2Cycles)
A patron is paying with cycles on behalf of the caller.
CallerPaysIcrc2Tokens(CallerPaysIcrc2Tokens)
The caller is paying with tokens from their main account on the specified ledger.
PatronPaysIcrc2Tokens(PatronPaysIcrc2Tokens)
A patron is paying, on behalf of the caller, from an account on the specified ledger.
Trait Implementations§
Source§impl CandidType for PaymentType
impl CandidType for PaymentType
Source§impl Clone for PaymentType
impl Clone for PaymentType
Source§fn clone(&self) -> PaymentType
fn clone(&self) -> PaymentType
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 PaymentType
impl Debug for PaymentType
Source§impl<'de> Deserialize<'de> for PaymentType
impl<'de> Deserialize<'de> for PaymentType
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 PaymentType
impl PartialEq for PaymentType
impl Eq for PaymentType
impl StructuralPartialEq for PaymentType
Auto Trait Implementations§
impl Freeze for PaymentType
impl RefUnwindSafe for PaymentType
impl Send for PaymentType
impl Sync for PaymentType
impl Unpin for PaymentType
impl UnwindSafe for PaymentType
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