Struct solvent::DepGraph [] [src]

pub struct DepGraph<E: Eq + Copy + Hash> {
    pub dependencies: HashMap<E, HashSet<E>>,
    pub satisfied: HashSet<E>,
}

This is the dependency graph

Fields

List of dependencies. The first Element depends on the set of additional Elements.

The set of Elements already satisfied.

Methods

impl<E: Eq + Copy + Hash> DepGraph<E>
[src]

Create an empty DepGraph.

Add a dependency to a DepGraph. The node does not need to pre-exist, nor do the dependency nodes. But if the node does pre-exist, the depends_on will be added to its existing dependency list.

Add multiple dependencies of one node to a DepGraph. The node does not need to pre-exist, nor do the dependency elements. But if the node does pre-exist, the depends_on will be added to its existing dependency list.

This marks a node as satisfied. Iterators will not output such nodes.

Get an iterator to iterate through the dependencies of the target node.

Trait Implementations

impl<E: Debug + Eq + Copy + Hash> Debug for DepGraph<E>
[src]

Formats the value using the given formatter.

impl<E: Clone + Eq + Copy + Hash> Clone for DepGraph<E>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more