pub struct ExecutionDag {
pub nodes: HashMap<String, DagNode>,
pub ready_nodes: Vec<String>,
pub dynamic: bool,
}Expand description
Execution DAG - supports dynamic modification
Fields§
§nodes: HashMap<String, DagNode>All nodes in the DAG
ready_nodes: Vec<String>Currently ready nodes (in-degree = 0 among non-completed)
dynamic: boolWhether dynamic modification is allowed
Implementations§
Source§impl ExecutionDag
impl ExecutionDag
Sourcepub fn new() -> ExecutionDag
pub fn new() -> ExecutionDag
Create a new empty DAG
Sourcepub fn new_dynamic() -> ExecutionDag
pub fn new_dynamic() -> ExecutionDag
Create a dynamic DAG (allows modification during execution)
Sourcepub fn update_ready_nodes(&mut self)
pub fn update_ready_nodes(&mut self)
Update the list of ready nodes
Sourcepub fn get_node_mut(&mut self, id: &str) -> Option<&mut DagNode>
pub fn get_node_mut(&mut self, id: &str) -> Option<&mut DagNode>
Get a mutable node by ID
Sourcepub fn mark_running(&mut self, id: &str)
pub fn mark_running(&mut self, id: &str)
Mark a node as running
Sourcepub fn mark_completed(&mut self, id: &str)
pub fn mark_completed(&mut self, id: &str)
Mark a node as completed and update ready nodes
Sourcepub fn mark_failed(&mut self, id: &str)
pub fn mark_failed(&mut self, id: &str)
Mark a node as failed
Sourcepub fn is_completed(&self) -> bool
pub fn is_completed(&self) -> bool
Check if all nodes are completed
Sourcepub fn has_failed(&self) -> bool
pub fn has_failed(&self) -> bool
Check if any node has failed
Sourcepub fn completed_nodes(&self) -> Vec<&str>
pub fn completed_nodes(&self) -> Vec<&str>
Get all completed node IDs
Sourcepub fn failed_nodes(&self) -> Vec<&str>
pub fn failed_nodes(&self) -> Vec<&str>
Get all failed node IDs
Trait Implementations§
Source§impl Clone for ExecutionDag
impl Clone for ExecutionDag
Source§fn clone(&self) -> ExecutionDag
fn clone(&self) -> ExecutionDag
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ExecutionDag
impl Debug for ExecutionDag
Source§impl Default for ExecutionDag
impl Default for ExecutionDag
Source§fn default() -> ExecutionDag
fn default() -> ExecutionDag
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ExecutionDag
impl RefUnwindSafe for ExecutionDag
impl Send for ExecutionDag
impl Sync for ExecutionDag
impl Unpin for ExecutionDag
impl UnsafeUnpin for ExecutionDag
impl UnwindSafe for ExecutionDag
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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