Struct tree_sitter_graph::graph::GraphNode  
source · pub struct GraphNode {
    pub attributes: Attributes,
    /* private fields */
}Expand description
A node in a graph
Fields§
§attributes: AttributesThe set of attributes associated with this graph node
Implementations§
source§impl GraphNode
 
impl GraphNode
sourcepub fn add_edge(&mut self, sink: GraphNodeRef) -> Result<&mut Edge, &mut Edge>
 
pub fn add_edge(&mut self, sink: GraphNodeRef) -> Result<&mut Edge, &mut Edge>
Adds an edge to this node.  There can be at most one edge connecting any two graph nodes;
the result indicates whether the edge is new (Ok) or already existed (Err).  In either
case, you also get a mutable reference to the Edge instance for the edge.
sourcepub fn get_edge(&self, sink: GraphNodeRef) -> Option<&Edge>
 
pub fn get_edge(&self, sink: GraphNodeRef) -> Option<&Edge>
Returns a reference to an outgoing edge from this node, if it exists.
sourcepub fn get_edge_mut(&mut self, sink: GraphNodeRef) -> Option<&mut Edge>
 
pub fn get_edge_mut(&mut self, sink: GraphNodeRef) -> Option<&mut Edge>
Returns a mutable reference to an outgoing edge from this node, if it exists.