pub struct WithResultAs<T, F>where
F: FnOnce(T),{
pub f: F,
/* private fields */
}Expand description
Defines a lambda function to be called on the decoded result.
Value will be converted to type T, which should be compatible with the original type.
Fields§
§f: FImplementations§
Trait Implementations§
Source§impl<Env, Original, T, F> RHListItem<Env, Original> for WithResultAs<T, F>
impl<Env, Original, T, F> RHListItem<Env, Original> for WithResultAs<T, F>
Source§impl<Env, Original, T, F> RHListItemExec<SyncCallRawResult<<Env as TxEnv>::Api>, Env, Original> for WithResultAs<T, F>
impl<Env, Original, T, F> RHListItemExec<SyncCallRawResult<<Env as TxEnv>::Api>, Env, Original> for WithResultAs<T, 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.