pub struct LongRunningNodeAdapter<LRN, Context, Action, S>where
LRN: LongRunningNode<Context, Action>,
Context: Send + Sync + 'static,
Action: ActionType + LongRunningActionExt + Send + Sync + 'static + Debug,
S: StateStore,{ /* private fields */ }Expand description
An adapter that allows a LongRunningNode to be used as a standard Node. This adapter handles state management and action conversion.
Implementations§
Source§impl<LRN, Context, Action, S> LongRunningNodeAdapter<LRN, Context, Action, S>where
LRN: LongRunningNode<Context, Action>,
Context: Send + Sync + 'static,
Action: ActionType + LongRunningActionExt + Send + Sync + 'static + Debug,
S: StateStore,
impl<LRN, Context, Action, S> LongRunningNodeAdapter<LRN, Context, Action, S>where
LRN: LongRunningNode<Context, Action>,
Context: Send + Sync + 'static,
Action: ActionType + LongRunningActionExt + Send + Sync + 'static + Debug,
S: StateStore,
Sourcepub fn with_suspend_timeout(self, timeout: Duration) -> Self
pub fn with_suspend_timeout(self, timeout: Duration) -> Self
Set a timeout for suspended nodes
Trait Implementations§
Source§impl<LRN, Context, Action, S> Node<Context, Action> for LongRunningNodeAdapter<LRN, Context, Action, S>where
LRN: LongRunningNode<Context, Action>,
Context: Send + Sync + 'static,
Action: ActionType + LongRunningActionExt + Send + Sync + 'static + Debug,
S: StateStore,
LRN::Output: Send + Sync + 'static,
impl<LRN, Context, Action, S> Node<Context, Action> for LongRunningNodeAdapter<LRN, Context, Action, S>where
LRN: LongRunningNode<Context, Action>,
Context: Send + Sync + 'static,
Action: ActionType + LongRunningActionExt + Send + Sync + 'static + Debug,
S: StateStore,
LRN::Output: Send + Sync + 'static,
Source§fn process<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 mut Context,
) -> Pin<Box<dyn Future<Output = Result<NodeOutcome<Self::Output, Action>, FloxideError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn process<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 mut Context,
) -> Pin<Box<dyn Future<Output = Result<NodeOutcome<Self::Output, Action>, FloxideError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Process the node asynchronously
Auto Trait Implementations§
impl<LRN, Context, Action, S> Freeze for LongRunningNodeAdapter<LRN, Context, Action, S>
impl<LRN, Context, Action, S> RefUnwindSafe for LongRunningNodeAdapter<LRN, Context, Action, S>
impl<LRN, Context, Action, S> Send for LongRunningNodeAdapter<LRN, Context, Action, S>
impl<LRN, Context, Action, S> Sync for LongRunningNodeAdapter<LRN, Context, Action, S>
impl<LRN, Context, Action, S> Unpin for LongRunningNodeAdapter<LRN, Context, Action, S>
impl<LRN, Context, Action, S> UnsafeUnpin for LongRunningNodeAdapter<LRN, Context, Action, S>
impl<LRN, Context, Action, S> UnwindSafe for LongRunningNodeAdapter<LRN, Context, Action, S>
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