multiversx_sc_scenario::imports

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 as TxEnv>::RHExpect, ) -> <Env as TxEnv>::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 as TxEnv>::RHExpect, ) -> <Env as TxEnv>::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 as TxEnv>::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 as TxEnv>::Api, ManagedBuffer<<Env as TxEnv>::Api>>),

Source§

impl<Env, Original> RHListItemExec<TxResponse, Env, Original> for ExpectError<'_>
where Env: TxEnv<RHExpect = TxExpect>,

Source§

impl<Env, Original> RHListItemExec<TxResponse, Env, Original> for ExpectMessage<'_>
where Env: TxEnv<RHExpect = TxExpect>,

Source§

impl<Env, Original> RHListItemExec<TxResponse, Env, Original> for ExpectStatus
where Env: TxEnv<RHExpect = TxExpect>,

Source§

impl<Env, Original> RHListItemExec<TxResponse, Env, Original> for ReturnsGasUsed
where Env: TxEnv,

Source§

impl<Env, Original> RHListItemExec<TxResponse, Env, Original> for ReturnsLogs
where Env: TxEnv,

Source§

impl<Env, Original> RHListItemExec<TxResponse, Env, Original> for ReturnsMessage
where Env: TxEnv<RHExpect = TxExpect>,

Source§

impl<Env, Original> RHListItemExec<TxResponse, Env, Original> for ReturnsNewBech32Address
where Env: TxEnv,

Source§

impl<Env, Original> RHListItemExec<TxResponse, Env, Original> for ReturnsNewTokenIdentifier
where Env: TxEnv,

Source§

impl<Env, Original> RHListItemExec<TxResponse, Env, Original> for ReturnsStatus
where Env: TxEnv<RHExpect = TxExpect>,

Source§

impl<Env, Original> RHListItemExec<TxResponse, Env, Original> for ReturnsTxHash
where Env: TxEnv,

Source§

impl<Env, Original> RHListItemExec<TxResponse, Env, Original> for ReturnsNewAddress
where Env: TxEnv,

Source§

impl<Env, Original> RHListItemExec<TxResponse, Env, Original> for ReturnsNewManagedAddress
where Env: TxEnv,

Source§

impl<Env, Original> RHListItemExec<TxResponse, Env, Original> for ReturnsRawResult
where Env: TxEnv,

Source§

impl<Env, Original> RHListItemExec<TxResponse, Env, Original> for ReturnsResult
where Env: TxEnv, Original: TopDecodeMulti,

Source§

impl<Env, Original> RHListItemExec<TxResponse, Env, Original> for ReturnsResultUnmanaged
where Env: TxEnv, Original: TypeAbi, Original::Unmanaged: TopDecodeMulti,

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 as TypeAbi>::Unmanaged: TopDecodeMulti,

Source§

impl<Env, Original, F> RHListItemExec<TxResponse, Env, Original> for WithRawTxResponse<F>
where Env: TxEnv, Original: TopDecodeMulti, F: FnOnce(&TxResponse),

Source§

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

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, NHList> RHListItemExec<TxResponse, Env, Original> for ReturnsHandledOrError<Env, Original, NHList>
where Env: TxEnv<RHExpect = TxExpect>, NHList: RHListExec<TxResponse, Env>, NHList::ListReturns: NestedTupleFlatten,

Source§

impl<Env, Original, T> RHListItemExec<TxResponse, Env, Original> for ExpectValue<T>
where Env: TxEnv<RHExpect = TxExpect>, T: TopEncodeMulti, Original: TypeAbiFrom<T>,

Source§

impl<Env, Original, T> RHListItemExec<TxResponse, Env, Original> for ReturnsResultAs<T>
where Env: TxEnv, T: TopDecodeMulti + TypeAbiFrom<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<TxResponse, Env, Original> for WithResultAs<T, F>
where Env: TxEnv, T: TopDecodeMulti + TypeAbiFrom<Original>, F: FnOnce(T),

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,