Trait CallValueApiImpl

Source
pub trait CallValueApiImpl:
    ErrorApiImpl
    + ManagedTypeApiImpl
    + Sized {
    // Required methods
    fn check_not_payable(&self);
    fn load_rewa_value(&self, dest_handle: Self::BigIntHandle);
    fn load_all_dcdt_transfers(&self, dest_handle: Self::ManagedBufferHandle);
    fn dcdt_num_transfers(&self) -> usize;
}

Required Methods§

Source

fn check_not_payable(&self)

Source

fn load_rewa_value(&self, dest_handle: Self::BigIntHandle)

Retrieves the REWA call value from the VM. Will return 0 in case of an DCDT transfer (cannot have both REWA and DCDT transfer simultaneously).

Source

fn load_all_dcdt_transfers(&self, dest_handle: Self::ManagedBufferHandle)

Loads all DCDT call values into a managed vec. Overwrites destination.

Source

fn dcdt_num_transfers(&self) -> usize

Gets the total number of DCDT transfers (Fungible/SFT/NFT).

It is redundant, since the number can also be retrieved from load_all_dcdt_transfers, but it is easier and cheaper to call when the content of those transfers is of no interest.

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§