multiversx_sc_snippets::imports

Trait TxPaymentEgldOnly

Source
pub trait TxPaymentEgldOnly<Env>: TxPayment<Env> + AnnotatedValue<Env, BigUint<<Env as TxEnv>::Api>>
where Env: TxEnv,
{ // Provided methods fn with_egld_value<F, R>(&self, env: &Env, f: F) -> R where F: FnOnce(&BigUint<<Env as TxEnv>::Api>) -> R { ... } fn into_egld_payment(self, env: &Env) -> BigUint<<Env as TxEnv>::Api> { ... } }
Expand description

Marks a payment object that only contains EGLD or nothing at all.

Provided Methods§

Source

fn with_egld_value<F, R>(&self, env: &Env, f: F) -> R
where F: FnOnce(&BigUint<<Env as TxEnv>::Api>) -> R,

Source

fn into_egld_payment(self, env: &Env) -> BigUint<<Env as TxEnv>::Api>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<Env> TxPaymentEgldOnly<Env> for ()
where Env: TxEnv,

Implementors§

Source§

impl<Env> TxPaymentEgldOnly<Env> for NotPayable
where Env: TxEnv,

Source§

impl<Env, EgldValue> TxPaymentEgldOnly<Env> for Egld<EgldValue>
where Env: TxEnv, EgldValue: TxEgldValue<Env>,