pub struct Graph {
pub nodes: HashMap<String, Node>,
pub edges: Vec<Edge>,
pub forward: HashMap<String, Vec<usize>>,
pub reverse: HashMap<String, Vec<usize>>,
pub child_graphs: Vec<String>,
pub interface: Vec<String>,
pub target_properties: HashMap<String, TargetProperties>,
}Fields§
§nodes: HashMap<String, Node>§edges: Vec<Edge>§forward: HashMap<String, Vec<usize>>§reverse: HashMap<String, Vec<usize>>§child_graphs: Vec<String>§interface: Vec<String>Resolved interface nodes from config (empty = open graph).
target_properties: HashMap<String, TargetProperties>Filesystem properties of edge targets, keyed by node identity (fragment-stripped).
Implementations§
Source§impl Graph
impl Graph
pub fn new() -> Self
pub fn add_node(&mut self, node: Node)
Sourcepub fn is_file_node(&self, path: &str) -> bool
pub fn is_file_node(&self, path: &str) -> bool
Returns true for File nodes (excludes External and Directory). Used by structural analyses that operate only on declared file-backed nodes.
pub fn add_edge(&mut self, edge: Edge)
Sourcepub fn target_props(&self, target: &str) -> Option<&TargetProperties>
pub fn target_props(&self, target: &str) -> Option<&TargetProperties>
Get filesystem properties for an edge target.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Graph
impl RefUnwindSafe for Graph
impl Send for Graph
impl Sync for Graph
impl Unpin for Graph
impl UnsafeUnpin for Graph
impl UnwindSafe for Graph
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