multiversx_sc::types

Trait RHListItemExec

Source
pub trait RHListItemExec<RawResult, Env, Original>: RHListItem<Env, Original>
where Env: TxEnv,
{ // Required method fn item_process_result(self, raw_result: &RawResult) -> Self::Returns; // Provided method fn item_tx_expect(&self, prev: Env::RHExpect) -> Env::RHExpect { ... } }
Expand description

Indicates how result processing will undergo for one specific result handler.

Note that the ResultType needs to be the first generic type in the definition, so we can add new implementations of the same result handlers for new raw result types in subsequent crates.

Required Methods§

Source

fn item_process_result(self, raw_result: &RawResult) -> Self::Returns

The main functionality of a result handler, it either does some computation internally (e.g. execution of a lambda function), or produces a result, or both.

Provided Methods§

Source

fn item_tx_expect(&self, prev: Env::RHExpect) -> Env::RHExpect

Part of the execution pre-processing, each result handler needs to produce an “expect” field, as defined in the environment.

The operation is chained, so all result handlers can contribute, hence the prev argument, which represents the “expect” field produces by the other result handlers.

The default behavior is to leave it unchanged.

Implementors§

Source§

impl<Env, F, Original> RHListItemExec<DeployRawResult<<Env as TxEnv>::Api>, Env, Original> for WithNewAddress<Env, F>
where Env: TxEnv, F: FnOnce(&ManagedAddress<Env::Api>),

Source§

impl<Env, F, Original> RHListItemExec<SyncCallRawResult<<Env as TxEnv>::Api>, Env, Original> for WithRawResult<Env, F>
where Env: TxEnv, F: FnOnce(&ManagedVec<Env::Api, ManagedBuffer<Env::Api>>),

Source§

impl<Env, Original> RHListItemExec<DeployRawResult<<Env as TxEnv>::Api>, Env, Original> for ReturnsNewAddress
where Env: TxEnv,

Source§

impl<Env, Original> RHListItemExec<DeployRawResult<<Env as TxEnv>::Api>, Env, Original> for ReturnsNewManagedAddress
where Env: TxEnv,

Source§

impl<Env, Original> RHListItemExec<DeployRawResult<<Env as TxEnv>::Api>, Env, Original> for ReturnsRawResult
where Env: TxEnv,

Source§

impl<Env, Original> RHListItemExec<DeployRawResult<<Env as TxEnv>::Api>, Env, Original> for ReturnsResult
where Env: TxEnv, Original: TopDecodeMulti,

Source§

impl<Env, Original> RHListItemExec<SyncCallRawResult<<Env as TxEnv>::Api>, Env, Original> for ReturnsRawResult
where Env: TxEnv,

Source§

impl<Env, Original> RHListItemExec<SyncCallRawResult<<Env as TxEnv>::Api>, Env, Original> for ReturnsResult
where Env: TxEnv, Original: TopDecodeMulti,

Source§

impl<Env, Original> RHListItemExec<SyncCallRawResult<<Env as TxEnv>::Api>, Env, Original> for ReturnsResultUnmanaged
where Env: TxEnv, Original: TypeAbi, Original::Unmanaged: TopDecodeMulti,

Source§

impl<Env, Original, F> RHListItemExec<SyncCallRawResult<<Env as TxEnv>::Api>, Env, Original> for WithResult<Original, F>
where Env: TxEnv, Original: TopDecodeMulti, F: FnOnce(Original),

Source§

impl<Env, Original, T> RHListItemExec<SyncCallRawResult<<Env as TxEnv>::Api>, Env, Original> for ReturnsResultAs<T>
where Env: TxEnv, T: TopDecodeMulti + TypeAbiFrom<Original>,

Source§

impl<Env, Original, T, F> RHListItemExec<SyncCallRawResult<<Env as TxEnv>::Api>, Env, Original> for WithResultAs<T, F>
where Env: TxEnv, T: TopDecodeMulti + TypeAbiFrom<Original>, F: FnOnce(T),

Source§

impl<RawResult, Env, Original> RHListItemExec<RawResult, Env, Original> for ReturnsBackTransfers
where Env: TxEnv,

Source§

impl<RawResult, Env, Original> RHListItemExec<RawResult, Env, Original> for ReturnsBackTransfersEGLD
where Env: TxEnv,

Source§

impl<RawResult, Env, Original> RHListItemExec<RawResult, Env, Original> for ReturnsBackTransfersMultiESDT
where Env: TxEnv,

Source§

impl<RawResult, Env, Original> RHListItemExec<RawResult, Env, Original> for ReturnsBackTransfersSingleESDT
where Env: TxEnv,

Source§

impl<RawResult, Env, Original, T> RHListItemExec<RawResult, Env, Original> for PassValue<T>
where Env: TxEnv,