multiversx_sc::types

Trait TxToSpecified

Source
pub trait TxToSpecified<Env>: TxTo<Env> + AnnotatedValue<Env, ManagedAddress<Env::Api>>
where Env: TxEnv,
{ // Provided method fn with_address_ref<F, R>(&self, env: &Env, f: F) -> R where F: FnOnce(&ManagedAddress<Env::Api>) -> R { ... } }
Expand description

Marks the non-empty recipient of a transaction.

Enforces the recipient to be explicitly specified.

Provided Methods§

Source

fn with_address_ref<F, R>(&self, env: &Env, f: F) -> R
where F: FnOnce(&ManagedAddress<Env::Api>) -> R,

Avoids a clone when performing transfer-execute.

Other than that, does thesame as AnnotatedValue::into_value.

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.

Implementors§

Source§

impl<Api> TxToSpecified<TxScEnv<Api>> for ToCaller

Source§

impl<Api> TxToSpecified<TxScEnv<Api>> for ToSelf

Source§

impl<Env> TxToSpecified<Env> for &Address
where Env: TxEnv,

Source§

impl<Env> TxToSpecified<Env> for &ManagedAddress<Env::Api>
where Env: TxEnv,

Source§

impl<Env> TxToSpecified<Env> for Address
where Env: TxEnv,

Source§

impl<Env> TxToSpecified<Env> for ESDTSystemSCAddress
where Env: TxEnv,

Source§

impl<Env> TxToSpecified<Env> for ManagedAddress<Env::Api>
where Env: TxEnv,

Source§

impl<Env> TxToSpecified<Env> for TestAddress<'_>
where Env: TxEnv,

Source§

impl<Env> TxToSpecified<Env> for TestSCAddress<'_>
where Env: TxEnv,