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::RHExpect) -> Env::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§
Sourcefn item_process_result(self, raw_result: &RawResult) -> Self::Returns
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§
Sourcefn item_tx_expect(&self, prev: Env::RHExpect) -> Env::RHExpect
fn item_tx_expect(&self, prev: Env::RHExpect) -> Env::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.