pub struct DagPipeline { /* private fields */ }Expand description
The DAG pipeline definition.
Implementations§
Source§impl DagPipeline
impl DagPipeline
Sourcepub fn node_ids(&self) -> impl Iterator<Item = u32> + '_
pub fn node_ids(&self) -> impl Iterator<Item = u32> + '_
Iterate present node IDs in deterministic ascending ID order.
Sourcepub fn downstream(&self, id: u32) -> &[u32]
pub fn downstream(&self, id: u32) -> &[u32]
Get the downstream nodes of a given node.
Sourcepub fn topological_sort(&self) -> Result<Vec<u32>, DagError>
pub fn topological_sort(&self) -> Result<Vec<u32>, DagError>
Topological sort. Returns node IDs in dependency order. Returns Err if a cycle is detected.
Sourcepub fn entry_nodes(&self) -> Vec<u32>
pub fn entry_nodes(&self) -> Vec<u32>
Get the entry nodes (nodes with no upstream dependencies).
Sourcepub fn exit_nodes(&self) -> Vec<u32>
pub fn exit_nodes(&self) -> Vec<u32>
Get the exit nodes (nodes with no downstream dependencies).
Sourcepub fn validate(&self, available_caps: &[String]) -> Result<(), DagError>
pub fn validate(&self, available_caps: &[String]) -> Result<(), DagError>
Validate the DAG: check for cycles, missing budgets on hot nodes, and missing capabilities.
Sourcepub fn node_count(&self) -> usize
pub fn node_count(&self) -> usize
Number of nodes.
Sourcepub fn edge_count(&self) -> usize
pub fn edge_count(&self) -> usize
Number of edges.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DagPipeline
impl RefUnwindSafe for DagPipeline
impl Send for DagPipeline
impl Sync for DagPipeline
impl Unpin for DagPipeline
impl UnsafeUnpin for DagPipeline
impl UnwindSafe for DagPipeline
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