pub struct DependencyGraph {
pub nodes: Vec<String>,
pub edges: Vec<Vec<usize>>,
pub reverse_edges: Vec<Vec<usize>>,
pub node_metadata: Vec<DependencyNodeMetadata>,
}
Expand description
Dependency graph representation
Fields§
§nodes: Vec<String>
Node IDs (file paths)
edges: Vec<Vec<usize>>
Adjacency list (node_id -> [dependent_node_ids])
reverse_edges: Vec<Vec<usize>>
Reverse adjacency list (node_id -> [dependency_node_ids])
node_metadata: Vec<DependencyNodeMetadata>
Node metadata
Implementations§
Source§impl DependencyGraph
impl DependencyGraph
Sourcepub fn add_node(
&mut self,
path: String,
metadata: DependencyNodeMetadata,
) -> usize
pub fn add_node( &mut self, path: String, metadata: DependencyNodeMetadata, ) -> usize
Add a node to the graph
Sourcepub fn stats(&self) -> GraphStats
pub fn stats(&self) -> GraphStats
Get graph statistics
Trait Implementations§
Source§impl Clone for DependencyGraph
impl Clone for DependencyGraph
Source§fn clone(&self) -> DependencyGraph
fn clone(&self) -> DependencyGraph
Returns a duplicate of the value. Read more
1.0.0 · 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 DependencyGraph
impl Debug for DependencyGraph
Auto Trait Implementations§
impl Freeze for DependencyGraph
impl RefUnwindSafe for DependencyGraph
impl Send for DependencyGraph
impl Sync for DependencyGraph
impl Unpin for DependencyGraph
impl UnwindSafe for DependencyGraph
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