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>,
}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).
Implementations§
Source§impl Graph
impl Graph
pub fn new() -> Self
Sourcepub fn is_interfaced(&self, path: &str) -> bool
pub fn is_interfaced(&self, path: &str) -> bool
Whether a node is part of this graph’s interface.
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 Source and Resource nodes (excludes External and Graph). Used by structural analyses that operate only on file-backed nodes.
pub fn add_edge(&mut self, edge: Edge)
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