Struct stack_graphs::graph::StackGraph [−][src]
pub struct StackGraph { /* fields omitted */ }
Expand description
Contains all of the nodes and edges that make up a stack graph.
Implementations
Adds a symbol to the stack graph, ensuring that there’s only ever one copy of a particular symbol stored in the graph.
Returns an iterator over all of the handles of all of the symbols in this stack graph.
(Note that because we’re only returning handles, this iterator does not retain a
reference to the StackGraph
.)
Adds a file to the stack graph. There can only ever be one file with a particular name in
the graph. If a file with the requested name already exists, we return Err
; if it
doesn’t already exist, we return Ok
. In both cases, the value of the result is the
file’s handle.
Adds a file to the stack graph, returning its handle. There can only ever be one file with a particular name in the graph, so if you call this multiple times with the same name, you’ll get the same handle each time.
Returns an iterator of all of the nodes that belong to a particular file. Note that this does not include the singleton root or jump to scope nodes.
Returns an iterator over all of the handles of all of the files in this stack graph. (Note
that because we’re only returning handles, this iterator does not retain a reference to
the StackGraph
.)
Returns a handle to the stack graph’s singleton jump to scope node.
Returns a handle to the stack graph’s singleton root node.
Returns an unused NodeID
for the given file.
Returns an iterator of all of the nodes in the graph. (Note that because we’re only
returning handles, this iterator does not retain a reference to the StackGraph
.)
Adds a new edge to the stack graph.
Removes an edge from the stack graph.
Creates a new, initially empty stack graph.