pub struct DagWorkflowEngine { /* private fields */ }Expand description
Lightweight DAG workflow engine.
Executes nodes in topological order. For each node it calls the registered
executor closure (if any) and tracks per-node status.
Implementations§
Source§impl DagWorkflowEngine
impl DagWorkflowEngine
Sourcepub fn new() -> Self
pub fn new() -> Self
Create an engine without an executor (nodes are marked Completed immediately).
Sourcepub fn with_executor<F>(self, f: F) -> Self
pub fn with_executor<F>(self, f: F) -> Self
Attach a node executor closure.
Sourcepub fn execute(&self, dag: &mut WorkflowDag) -> Result<DagRunStatus, DagError>
pub fn execute(&self, dag: &mut WorkflowDag) -> Result<DagRunStatus, DagError>
Sourcepub fn node_status(&self, node_id: NodeId) -> Option<NodeStatus>
pub fn node_status(&self, node_id: NodeId) -> Option<NodeStatus>
Get the current status of a node (across all runs).
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for DagWorkflowEngine
impl !UnwindSafe for DagWorkflowEngine
impl Freeze for DagWorkflowEngine
impl Send for DagWorkflowEngine
impl Sync for DagWorkflowEngine
impl Unpin for DagWorkflowEngine
impl UnsafeUnpin for DagWorkflowEngine
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