pub struct GraphBuilder {}Expand description
Builder for constructing dependency graphs
Implementations§
Source§impl GraphBuilder
impl GraphBuilder
Sourcepub fn build(
&self,
files: &[FileInfo],
) -> Result<(DiGraph<RichNode, DependencyEdgeType>, HashMap<PathBuf, NodeIndex>)>
pub fn build( &self, files: &[FileInfo], ) -> Result<(DiGraph<RichNode, DependencyEdgeType>, HashMap<PathBuf, NodeIndex>)>
Build a dependency graph from file information
Sourcepub fn add_edge(
&self,
graph: &mut DiGraph<RichNode, DependencyEdgeType>,
from: NodeIndex,
to: NodeIndex,
edge_type: DependencyEdgeType,
)
pub fn add_edge( &self, graph: &mut DiGraph<RichNode, DependencyEdgeType>, from: NodeIndex, to: NodeIndex, edge_type: DependencyEdgeType, )
Add a dependency edge to the graph
Sourcepub fn build_edges_from_imports(
&self,
graph: &mut DiGraph<RichNode, DependencyEdgeType>,
files: &[FileInfo],
node_map: &HashMap<PathBuf, NodeIndex>,
)
pub fn build_edges_from_imports( &self, graph: &mut DiGraph<RichNode, DependencyEdgeType>, files: &[FileInfo], node_map: &HashMap<PathBuf, NodeIndex>, )
Build edges from file import information
Sourcepub fn build_edges_from_analysis(
&self,
graph: &mut DiGraph<RichNode, DependencyEdgeType>,
analysis_results: &[FileAnalysisResult],
path_to_index: &HashMap<PathBuf, usize>,
node_map: &HashMap<PathBuf, NodeIndex>,
)
pub fn build_edges_from_analysis( &self, graph: &mut DiGraph<RichNode, DependencyEdgeType>, analysis_results: &[FileAnalysisResult], path_to_index: &HashMap<PathBuf, usize>, node_map: &HashMap<PathBuf, NodeIndex>, )
Build edges from parallel analysis results
Trait Implementations§
Auto Trait Implementations§
impl Freeze for GraphBuilder
impl RefUnwindSafe for GraphBuilder
impl Send for GraphBuilder
impl Sync for GraphBuilder
impl Unpin for GraphBuilder
impl UnwindSafe for GraphBuilder
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more