pub struct DependencyGraph {
pub forward: HashMap<NodeId, HashSet<NodeId>>,
pub inverse: HashMap<NodeId, HashSet<NodeId>>,
}Expand description
A dependency graph.
Fields§
§forward: HashMap<NodeId, HashSet<NodeId>>A map from a node to a set of nodes it depends on.
inverse: HashMap<NodeId, HashSet<NodeId>>A map from a node to a set of nodes that depend on it.
Implementations§
Source§impl DependencyGraph
impl DependencyGraph
Sourcepub fn from_lockfile(lockfile: &Lockfile, workspace_dir: &Path) -> Result<Self>
pub fn from_lockfile(lockfile: &Lockfile, workspace_dir: &Path) -> Result<Self>
Construct a DependencyGraph from a Lockfile.
Computes a forwards and inverse dependency graph from the lockfile, used to print and filter the dependency tree.
§Errors
Error::UnexpectedLockfileContentIf the lockfile content could not be understood.
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