pub struct WithResult<T, F>where
F: FnOnce(T),{ /* private fields */ }Expand description
Defines a lambda function to be called on the decoded result.
Value will be decoded according to the type defined in the smart contract.
Implementations§
Trait Implementations§
Source§impl<Env, Original, F> RHListItem<Env, Original> for WithResult<Original, F>
impl<Env, Original, F> RHListItem<Env, Original> for WithResult<Original, F>
Source§impl<Env, Original, F> RHListItemExec<SyncCallRawResult<<Env as TxEnv>::Api>, Env, Original> for WithResult<Original, F>
impl<Env, Original, F> RHListItemExec<SyncCallRawResult<<Env as TxEnv>::Api>, Env, Original> for WithResult<Original, F>
Source§fn item_process_result(
self,
raw_result: &SyncCallRawResult<Env::Api>,
) -> Self::Returns
fn item_process_result( self, raw_result: &SyncCallRawResult<Env::Api>, ) -> 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.