pub struct ReturnsHandledOrError<Env, Original, NHList>{
pub nested_handlers: NHList,
/* private fields */
}
Expand description
Indicates that a Result
will be returned, either with the handled result,
according to the nested result handlers, or with an error in case of a failed transaction.
Fields§
§nested_handlers: NHList
Implementations§
Source§impl<Env, Original> ReturnsHandledOrError<Env, Original, OriginalResultMarker<Original>>where
Env: TxEnv,
impl<Env, Original> ReturnsHandledOrError<Env, Original, OriginalResultMarker<Original>>where
Env: TxEnv,
Source§impl<Env, Original, NHList> ReturnsHandledOrError<Env, Original, NHList>
impl<Env, Original, NHList> ReturnsHandledOrError<Env, Original, NHList>
pub fn returns<RH>( self, item: RH, ) -> ReturnsHandledOrError<Env, Original, NHList::RetOutput>
Trait Implementations§
Source§impl<Env, Original> Default for ReturnsHandledOrError<Env, Original, OriginalResultMarker<Original>>where
Env: TxEnv,
impl<Env, Original> Default for ReturnsHandledOrError<Env, Original, OriginalResultMarker<Original>>where
Env: TxEnv,
Source§impl<Env, Original, NHList> RHListItem<Env, Original> for ReturnsHandledOrError<Env, Original, NHList>
impl<Env, Original, NHList> RHListItem<Env, Original> for ReturnsHandledOrError<Env, Original, NHList>
type Returns = Result<<<NHList as RHList<Env>>::ListReturns as NestedTupleFlatten>::Unpacked, TxResponseStatus>
Source§impl<Env, Original, NHList> RHListItemExec<TxResponse, Env, Original> for ReturnsHandledOrError<Env, Original, NHList>where
Env: TxEnv<RHExpect = TxExpect>,
NHList: RHListExec<TxResponse, Env>,
NHList::ListReturns: NestedTupleFlatten,
impl<Env, Original, NHList> RHListItemExec<TxResponse, Env, Original> for ReturnsHandledOrError<Env, Original, NHList>where
Env: TxEnv<RHExpect = TxExpect>,
NHList: RHListExec<TxResponse, Env>,
NHList::ListReturns: NestedTupleFlatten,
Source§fn item_tx_expect(&self, prev: TxExpect) -> TxExpect
fn item_tx_expect(&self, prev: TxExpect) -> TxExpect
Part of the execution pre-processing, each result handler needs to produce an “expect” field,
as defined in the environment. Read more
Source§fn item_process_result(self, raw_result: &TxResponse) -> Self::Returns
fn item_process_result(self, raw_result: &TxResponse) -> 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<Env, Original, NHList> Freeze for ReturnsHandledOrError<Env, Original, NHList>where
NHList: Freeze,
impl<Env, Original, NHList> RefUnwindSafe for ReturnsHandledOrError<Env, Original, NHList>
impl<Env, Original, NHList> Send for ReturnsHandledOrError<Env, Original, NHList>
impl<Env, Original, NHList> Sync for ReturnsHandledOrError<Env, Original, NHList>
impl<Env, Original, NHList> Unpin for ReturnsHandledOrError<Env, Original, NHList>
impl<Env, Original, NHList> UnwindSafe for ReturnsHandledOrError<Env, Original, NHList>
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
Source§impl<T> InterpretableFrom<T> for T
impl<T> InterpretableFrom<T> for T
fn interpret_from(from: T, _context: &InterpreterContext) -> T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more