pub struct LongRunningWorkflow<Context, Action, S>where
Context: Send + Sync + 'static,
Action: ActionType + LongRunningActionExt + Send + Sync + 'static + Debug,
S: StateStore,{ /* private fields */ }Expand description
A workflow for orchestrating long-running nodes. This manages the suspension and resumption of nodes.
Implementations§
Source§impl<Context, Action, S> LongRunningWorkflow<Context, Action, S>where
Context: Send + Sync + 'static,
Action: ActionType + LongRunningActionExt + Send + Sync + 'static + Debug,
S: StateStore,
impl<Context, Action, S> LongRunningWorkflow<Context, Action, S>where
Context: Send + Sync + 'static,
Action: ActionType + LongRunningActionExt + Send + Sync + 'static + Debug,
S: StateStore,
Sourcepub async fn execute_node<LRN>(
&self,
node: &LRN,
ctx: &mut Context,
) -> Result<NodeOutcome<Action, Action>, FloxideError>where
LRN: LongRunningNode<Context, Action>,
pub async fn execute_node<LRN>(
&self,
node: &LRN,
ctx: &mut Context,
) -> Result<NodeOutcome<Action, Action>, FloxideError>where
LRN: LongRunningNode<Context, Action>,
Execute a single long-running node until completion or suspension
Sourcepub async fn has_suspended_state(
&self,
node_id: NodeId,
) -> Result<bool, FloxideError>
pub async fn has_suspended_state( &self, node_id: NodeId, ) -> Result<bool, FloxideError>
Check if a node has suspended state
Sourcepub async fn get_suspended_nodes(&self) -> Result<Vec<NodeId>, FloxideError>
pub async fn get_suspended_nodes(&self) -> Result<Vec<NodeId>, FloxideError>
Get all node IDs with suspended state
Auto Trait Implementations§
impl<Context, Action, S> Freeze for LongRunningWorkflow<Context, Action, S>
impl<Context, Action, S> RefUnwindSafe for LongRunningWorkflow<Context, Action, S>
impl<Context, Action, S> Send for LongRunningWorkflow<Context, Action, S>
impl<Context, Action, S> Sync for LongRunningWorkflow<Context, Action, S>
impl<Context, Action, S> Unpin for LongRunningWorkflow<Context, Action, S>
impl<Context, Action, S> UnwindSafe for LongRunningWorkflow<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