GraphView

Trait GraphView 

Source
pub trait GraphView<N: Copy + Eq + Hash> {
    // Required methods
    fn successors(&self, n: N, out: &mut Vec<N>);
    fn predecessors(&self, n: N, out: &mut Vec<N>);
    fn exists(&self, n: N) -> bool;
}
Expand description

GraphView abstracts the conceptual DAG over which we maintain order. Implementations should provide successors (dependents) and predecessors (dependencies) for a node, using the engine’s storage as the source of truth. The provided Vecs are scratch buffers owned by the caller; implementors should push into them without heap churn.

Required Methods§

Source

fn successors(&self, n: N, out: &mut Vec<N>)

Source

fn predecessors(&self, n: N, out: &mut Vec<N>)

Source

fn exists(&self, n: N) -> bool

Implementors§