Trait dependency_graph::Node[][src]

pub trait Node {
    type DependencyType;
    fn dependencies(&self) -> &[Self::DependencyType];
fn matches(&self, dependency: &Self::DependencyType) -> bool; }
Expand description

Must be implemented by the type you wish to build a dependency graph for. See the README.md for an example

Associated Types

Encodes a dependency relationship. In a Package Manager dependency graph for intance, this might be a (package name, version) tuple. It might also just be the exact same type as the one that implements the Node trait, in which case Node::matches can be implemented through simple equality.

Required methods

Returns a slice of dependencies for this Node

Returns true if the dependency can be met by us.

Implementors