pub struct DepGraph { /* private fields */ }Expand description
A resolved dependency graph. edges[i] holds the indices of the nodes that node i depends
on (forward adjacency).
Implementations§
Source§impl DepGraph
impl DepGraph
Sourcepub fn nodes_mut(&mut self) -> &mut [DepNode]
pub fn nodes_mut(&mut self) -> &mut [DepNode]
All nodes, mutably — used by lockfile parsers that only learn a node’s direct status after
the whole file is read (e.g. bundler lists direct gems in a trailing DEPENDENCIES section).
Sourcepub fn direct_count(&self) -> usize
pub fn direct_count(&self) -> usize
Number of direct dependencies.
Sourcepub fn blast_radii(&self) -> Vec<usize>
pub fn blast_radii(&self) -> Vec<usize>
Blast radius of every node: the count of distinct other nodes that transitively depend on it. Computed for the whole graph in one pass (shared reverse adjacency).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DepGraph
impl RefUnwindSafe for DepGraph
impl Send for DepGraph
impl Sync for DepGraph
impl Unpin for DepGraph
impl UnsafeUnpin for DepGraph
impl UnwindSafe for DepGraph
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