pub struct GraphBuilder { /* private fields */ }Implementations§
Source§impl GraphBuilder
impl GraphBuilder
pub fn new() -> Self
pub fn add_node(&mut self, node: Node) -> bool
pub fn add_edge(&mut self, edge: Edge)
pub fn node_count(&self) -> usize
pub fn edge_count_of_kind(&self, kind: EdgeKind) -> usize
pub fn nodes(&self) -> &Vec<Node>
pub fn nodes_mut(&mut self) -> &mut Vec<Node>
Sourcepub fn find_file_node(&self, path: &str) -> Option<NodeId>
pub fn find_file_node(&self, path: &str) -> Option<NodeId>
Look up an existing File node by path (canonicalized by the caller).
Returns the node ID if exactly one match is found, None otherwise.
pub fn build(self) -> Graph
Trait Implementations§
Source§impl Debug for GraphBuilder
impl Debug for GraphBuilder
Source§impl Default for GraphBuilder
impl Default for GraphBuilder
Source§fn default() -> GraphBuilder
fn default() -> GraphBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for GraphBuilder
impl RefUnwindSafe for GraphBuilder
impl Send for GraphBuilder
impl Sync for GraphBuilder
impl Unpin for GraphBuilder
impl UnsafeUnpin 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