Struct stack_graphs::stitching::Database[][src]

pub struct Database { /* fields omitted */ }
Expand description

Contains a “database” of partial paths.

This type is meant to be a lazily loaded “view” into a proper storage layer. During the path-stitching algorithm, we repeatedly try to extend a currently incomplete path with any partial paths that are compatible with it. For large codebases, or projects with a large number of dependencies, it can be prohibitive to load in all of the partial paths up-front. We’ve written the path-stitching algorithm so that you have a chance to only load in the partial paths that are actually needed, placing them into a Database instance as they’re needed.

Implementations

Creates a new, empty database.

Adds a partial path to this database. We do not deduplicate partial paths in any way; it’s your responsibility to only add each partial path once.

Find all partial paths in this database that start at the root node, and have a symbol stack precondition that is compatible with a given symbol stack.

Find all partial paths in the database that start at the given node. We don’t filter the results any further than that, since we have to check each partial path for compatibility as we try to append it to the current incomplete path anyway, and non-root nodes will typically have a small number of outgoing edges.

Trait Implementations

The returned type after indexing.

Performs the 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

Performs the conversion.

Performs the conversion.

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.