pub struct DependencyResolver { /* private fields */ }Expand description
Resolves a set of TaskDependency edges into a topologically-sorted
execution order, detecting cycles.
Implementations§
Source§impl DependencyResolver
impl DependencyResolver
Sourcepub fn add(&mut self, dep: TaskDependency)
pub fn add(&mut self, dep: TaskDependency)
Adds a dependency edge.
Sourcepub fn edge_count(&self) -> usize
pub fn edge_count(&self) -> usize
Returns the number of edges.
Sourcepub fn edges(&self) -> &[TaskDependency]
pub fn edges(&self) -> &[TaskDependency]
Returns all registered edges.
Sourcepub fn all_tasks(&self) -> HashSet<String>
pub fn all_tasks(&self) -> HashSet<String>
Collects the set of all task IDs referenced in the edges.
Sourcepub fn predecessors(&self, task_id: &str) -> Vec<String>
pub fn predecessors(&self, task_id: &str) -> Vec<String>
Returns the direct predecessors (hard deps only) of a given task.
Sourcepub fn successors(&self, task_id: &str) -> Vec<String>
pub fn successors(&self, task_id: &str) -> Vec<String>
Returns the direct successors (hard deps only) of a given task.
Trait Implementations§
Source§impl Clone for DependencyResolver
impl Clone for DependencyResolver
Source§fn clone(&self) -> DependencyResolver
fn clone(&self) -> DependencyResolver
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 DependencyResolver
impl Debug for DependencyResolver
Source§impl Default for DependencyResolver
impl Default for DependencyResolver
Source§fn default() -> DependencyResolver
fn default() -> DependencyResolver
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for DependencyResolver
impl RefUnwindSafe for DependencyResolver
impl Send for DependencyResolver
impl Sync for DependencyResolver
impl Unpin for DependencyResolver
impl UnsafeUnpin for DependencyResolver
impl UnwindSafe for DependencyResolver
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