multiversx_sc_snippets::imports

Trait TxResultHandler

Source
pub trait TxResultHandler<Env>
where Env: TxEnv,
{ type OriginalResult; }
Expand description

Marks a general result handler, to be used in the transaction unified syntax.

Rationale described here: https://twitter.com/andreimmarinica/status/1781371938750841288

Used for:

  • async callbacks
  • processing of results in sync calls, tests and interactors.

Required Associated Types§

Implementations on Foreign Types§

Source§

impl<Api> TxResultHandler<TxScEnv<Api>> for Option<CallbackClosure<Api>>
where Api: CallTypeApi,

Source§

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

Implementors§

Source§

impl<Api> TxResultHandler<TxScEnv<Api>> for CallbackClosure<Api>
where Api: CallTypeApi,

Source§

impl<Env, Head, Tail> TxResultHandler<Env> for ConsNoRet<Env, Head, Tail>
where Env: TxEnv, Head: RHListItem<Env, <Tail as TxResultHandler<Env>>::OriginalResult, Returns = ()>, Tail: RHList<Env>,

Source§

impl<Env, Head, Tail> TxResultHandler<Env> for ConsRet<Env, Head, Tail>
where Env: TxEnv, Head: RHListItem<Env, <Tail as TxResultHandler<Env>>::OriginalResult>, Tail: RHList<Env>,

Source§

impl<Env, O> TxResultHandler<Env> for OriginalResultMarker<O>
where Env: TxEnv,