pub struct GraphBuilder { /* private fields */ }Expand description
Builds an ArborGraph from parsed code nodes.
The builder handles the two-pass process:
- Add all nodes to the graph
- Resolve references into edges (including cross-file)
Implementations§
Source§impl GraphBuilder
impl GraphBuilder
Sourcepub fn add_nodes(&mut self, nodes: Vec<CodeNode>)
pub fn add_nodes(&mut self, nodes: Vec<CodeNode>)
Adds nodes from a file to the graph.
Call this for each parsed file, then call resolve_edges
when all files are added.
Sourcepub fn resolve_edges(&mut self)
pub fn resolve_edges(&mut self)
Resolves references into actual graph edges.
This is the second pass after all nodes are added. It looks up reference names and creates edges where targets exist.
Sourcepub fn build(self) -> ArborGraph
pub fn build(self) -> ArborGraph
Finishes building and returns the graph.
Sourcepub fn build_without_resolve(self) -> ArborGraph
pub fn build_without_resolve(self) -> ArborGraph
Builds without resolving edges (for incremental updates).
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