pub struct DependencyGraph { /* private fields */ }Expand description
Dependency graph for topological sort
Implementations§
Source§impl DependencyGraph
impl DependencyGraph
pub fn new() -> Self
pub fn add_package(&mut self, name: &str, deps: &[String])
Sourcepub fn sort(&self) -> Result<Vec<String>, KernelError>
pub fn sort(&self) -> Result<Vec<String>, KernelError>
Topological sort using Kahn’s algorithm
Trait Implementations§
Source§impl Default for DependencyGraph
impl Default for DependencyGraph
Source§fn default() -> DependencyGraph
fn default() -> DependencyGraph
Returns the “default value” for a type. Read more