pub struct StructuralGraph {
pub graph: DiGraph<Node, Edge>,
/* private fields */
}Fields§
§graph: DiGraph<Node, Edge>Implementations§
Source§impl StructuralGraph
impl StructuralGraph
pub fn from_graph(graph: DiGraph<Node, Edge>) -> Self
pub fn build_from_analysis(entries: &[FileAnalysisOutput]) -> Self
pub fn bfs_blast_radius(&self, symbol: &str, depth: usize) -> Vec<NodeIndex>
Sourcepub fn blast_radius_subgraph(
&self,
symbol: &str,
depth: usize,
) -> (Vec<NodeIndex>, Vec<(NodeIndex, NodeIndex, Edge)>)
pub fn blast_radius_subgraph( &self, symbol: &str, depth: usize, ) -> (Vec<NodeIndex>, Vec<(NodeIndex, NodeIndex, Edge)>)
Blast-radius subgraph including both nodes and edges.
Returns a tuple of (nodes, edges) where:
- nodes: Vec
with the start symbol first, followed by all discovered nodes in BFS order - edges: Vec<(NodeIndex, NodeIndex, Edge)> containing every edge whose source and target are both in the visited set (not just edges walked by the BFS tree), allowing clients to fully reconstruct the subgraph’s connectivity
If the symbol is not found, returns (vec![], vec![]).
Trait Implementations§
Source§impl Clone for StructuralGraph
impl Clone for StructuralGraph
Source§fn clone(&self) -> StructuralGraph
fn clone(&self) -> StructuralGraph
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 StructuralGraph
impl Debug for StructuralGraph
Source§impl<'de> Deserialize<'de> for StructuralGraph
impl<'de> Deserialize<'de> for StructuralGraph
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for StructuralGraph
impl RefUnwindSafe for StructuralGraph
impl Send for StructuralGraph
impl Sync for StructuralGraph
impl Unpin for StructuralGraph
impl UnsafeUnpin for StructuralGraph
impl UnwindSafe for StructuralGraph
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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