pub struct ExecutionState { /* private fields */ }Expand description
Tracks the execution state of all nodes in the DAG using zero-heap inline storage.
Implementations§
Source§impl ExecutionState
impl ExecutionState
Sourcepub fn new(pipeline: &DagPipeline) -> Self
pub fn new(pipeline: &DagPipeline) -> Self
Creates a new ExecutionState.
Sourcepub fn status(&self, id: u32) -> NodeStatus
pub fn status(&self, id: u32) -> NodeStatus
Get the status of a node.
Sourcepub fn set_status(&mut self, id: u32, status: NodeStatus)
pub fn set_status(&mut self, id: u32, status: NodeStatus)
Set the status of a node.
Sourcepub fn ready_nodes(&self, pipeline: &DagPipeline) -> Vec<u32>
pub fn ready_nodes(&self, pipeline: &DagPipeline) -> Vec<u32>
Get all nodes that are ready to execute (all upstream completed).
Sourcepub fn all_completed(&self) -> bool
pub fn all_completed(&self) -> bool
Are all nodes completed?
Sourcepub fn completed_order(&self) -> &[u32]
pub fn completed_order(&self) -> &[u32]
Get the completion order.
Sourcepub fn count_by_status(&self, status: NodeStatus) -> usize
pub fn count_by_status(&self, status: NodeStatus) -> usize
Count nodes by status.
Auto Trait Implementations§
impl Freeze for ExecutionState
impl RefUnwindSafe for ExecutionState
impl Send for ExecutionState
impl Sync for ExecutionState
impl Unpin for ExecutionState
impl UnsafeUnpin for ExecutionState
impl UnwindSafe for ExecutionState
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