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: F
Implementations§
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.
Auto Trait Implementations§
impl<T, F> Freeze for WithResultAs<T, F>where
F: Freeze,
impl<T, F> RefUnwindSafe for WithResultAs<T, F>where
F: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, F> Send for WithResultAs<T, F>
impl<T, F> Sync for WithResultAs<T, F>
impl<T, F> Unpin for WithResultAs<T, F>
impl<T, F> UnwindSafe for WithResultAs<T, F>where
F: UnwindSafe,
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more