pub struct TransformContext<Input> {
pub input: Input,
}
Expand description
Context wrapper for TransformNode
Fields§
§input: Input
Implementations§
Source§impl<Input> TransformContext<Input>
impl<Input> TransformContext<Input>
Trait Implementations§
Source§impl<Input: Clone> Clone for TransformContext<Input>
impl<Input: Clone> Clone for TransformContext<Input>
Source§fn clone(&self) -> TransformContext<Input>
fn clone(&self) -> TransformContext<Input>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<Input: Debug> Debug for TransformContext<Input>
impl<Input: Debug> Debug for TransformContext<Input>
Source§impl<TN, Input, Output, Error, Action> LifecycleNode<TransformContext<Input>, Action> for TransformNodeAdapter<TN, Input, Output, Error, Action>
impl<TN, Input, Output, Error, Action> LifecycleNode<TransformContext<Input>, Action> for TransformNodeAdapter<TN, Input, Output, Error, Action>
Source§type PrepOutput = Input
type PrepOutput = Input
Output type from the preparation phase
Source§type ExecOutput = Output
type ExecOutput = Output
Output type from the execution phase
Source§fn prep<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 mut TransformContext<Input>,
) -> Pin<Box<dyn Future<Output = Result<Self::PrepOutput, FloxideError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn prep<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 mut TransformContext<Input>,
) -> Pin<Box<dyn Future<Output = Result<Self::PrepOutput, FloxideError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Preparation phase - perform setup and validation
Source§fn exec<'life0, 'async_trait>(
&'life0 self,
prep_result: Self::PrepOutput,
) -> Pin<Box<dyn Future<Output = Result<Self::ExecOutput, FloxideError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn exec<'life0, 'async_trait>(
&'life0 self,
prep_result: Self::PrepOutput,
) -> Pin<Box<dyn Future<Output = Result<Self::ExecOutput, FloxideError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Execution phase - perform the main work
Source§fn post<'life0, 'life1, 'async_trait>(
&'life0 self,
_prep_result: Self::PrepOutput,
exec_result: Self::ExecOutput,
_ctx: &'life1 mut TransformContext<Input>,
) -> Pin<Box<dyn Future<Output = Result<Action, FloxideError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn post<'life0, 'life1, 'async_trait>(
&'life0 self,
_prep_result: Self::PrepOutput,
exec_result: Self::ExecOutput,
_ctx: &'life1 mut TransformContext<Input>,
) -> Pin<Box<dyn Future<Output = Result<Action, FloxideError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Post-execution phase - determine the next action and update context
Auto Trait Implementations§
impl<Input> Freeze for TransformContext<Input>where
Input: Freeze,
impl<Input> RefUnwindSafe for TransformContext<Input>where
Input: RefUnwindSafe,
impl<Input> Send for TransformContext<Input>where
Input: Send,
impl<Input> Sync for TransformContext<Input>where
Input: Sync,
impl<Input> Unpin for TransformContext<Input>where
Input: Unpin,
impl<Input> UnwindSafe for TransformContext<Input>where
Input: 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