pub struct StackGraph { /* private fields */ }
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 an interned string to the stack graph, ensuring that there’s only ever one copy of a particular string stored in the graph.

Returns an iterator over all of the handles of all of the interned strings 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 the file with a particular name. Panics if there is no file with the requested name.

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.)

Returns the handle to the node with a particular ID, if it exists.

Adds a drop scopes node to the stack graph.

Adds a pop scoped symbol node to the stack graph.

Adds a pop symbol node to the stack graph.

Adds a push scoped symbol node to the stack graph.

Adds a push symbol node to the stack graph.

Adds a scope node to the stack graph.

Adds a new edge to the stack graph.

Removes an edge from the stack graph.

Returns an iterator of all of the edges that begin at a particular source node.

Returns information about the source code that a stack graph node represents.

Returns a mutable reference to the information about the source code that a stack graph node represents.

Returns debug information about the stack graph node.

Returns a mutable reference to the debug info about the stack graph node.

Creates a new, initially empty stack graph.

Copies the given stack graph into this stack graph. Panics if any of the files in the other stack graph are already defined in the current one.

Trait Implementations

Returns the “default value” for a type. Read more

The returned type after indexing.

Performs the indexing (container[index]) operation. Read more

The returned type after indexing.

Performs the indexing (container[index]) operation. Read more

The returned type after indexing.

Performs the indexing (container[index]) operation. Read more

The returned type after indexing.

Performs the indexing (container[index]) operation. Read more

Performs the mutable indexing (container[index]) operation. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Converts self into T using Into<T>. Read more

Causes self to use its Binary implementation when Debug-formatted.

Causes self to use its Display implementation when Debug-formatted. Read more

Causes self to use its LowerExp implementation when Debug-formatted. Read more

Causes self to use its LowerHex implementation when Debug-formatted. Read more

Causes self to use its Octal implementation when Debug-formatted.

Causes self to use its Pointer implementation when Debug-formatted. Read more

Causes self to use its UpperExp implementation when Debug-formatted. Read more

Causes self to use its UpperHex implementation when Debug-formatted. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Pipes by value. This is generally the method you want to use. Read more

Borrows self and passes that borrow into the pipe function. Read more

Mutably borrows self and passes that borrow into the pipe function. Read more

Borrows self, then passes self.borrow() into the pipe function. Read more

Mutably borrows self, then passes self.borrow_mut() into the pipe function. Read more

Borrows self, then passes self.as_ref() into the pipe function.

Mutably borrows self, then passes self.as_mut() into the pipe function. Read more

Borrows self, then passes self.deref() into the pipe function.

Mutably borrows self, then passes self.deref_mut() into the pipe function. Read more

Immutable access to a value. Read more

Mutable access to a value. Read more

Immutable access to the Borrow<B> of a value. Read more

Mutable access to the BorrowMut<B> of a value. Read more

Immutable access to the AsRef<R> view of a value. Read more

Mutable access to the AsMut<R> view of a value. Read more

Immutable access to the Deref::Target of a value. Read more

Mutable access to the Deref::Target of a value. Read more

Calls .tap() only in debug builds, and is erased in release builds.

Calls .tap_mut() only in debug builds, and is erased in release builds. Read more

Calls .tap_borrow() only in debug builds, and is erased in release builds. Read more

Calls .tap_borrow_mut() only in debug builds, and is erased in release builds. Read more

Calls .tap_ref() only in debug builds, and is erased in release builds. Read more

Calls .tap_ref_mut() only in debug builds, and is erased in release builds. Read more

Calls .tap_deref() only in debug builds, and is erased in release builds. Read more

Calls .tap_deref_mut() only in debug builds, and is erased in release builds. Read more

Attempts to convert self into T using TryInto<T>. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.