Trait daggy::Walker
[−]
[src]
pub trait Walker<Context> { type Item; fn walk_next(&mut self, context: Context) -> Option<Self::Item>; fn iter(self, context: Context) -> WalkerIter<Self, Context>
where
Context: Clone, { ... } }
A walker is a traversal state, but where part of the traversal information is supplied manually to each next call.
This for example allows graph traversals that don't hold a borrow of the graph they are traversing.
Associated Types
type Item
Required Methods
Provided Methods
ⓘImportant traits for WalkerIter<W, C>
fn iter(self, context: Context) -> WalkerIter<Self, Context> where
Context: Clone,
Context: Clone,
Create an iterator out of the walker and given context
.
Implementations on Foreign Types
impl<G> Walker<G> for DfsPostOrder<<G as GraphBase>::NodeId, <G as Visitable>::Map> where
G: IntoNeighbors + Visitable,
[src]
G: IntoNeighbors + Visitable,
impl<G> Walker<G> for Topo<<G as GraphBase>::NodeId, <G as Visitable>::Map> where
G: IntoNeighborsDirected + Visitable,
[src]
G: IntoNeighborsDirected + Visitable,
impl<G> Walker<G> for Dfs<<G as GraphBase>::NodeId, <G as Visitable>::Map> where
G: IntoNeighbors + Visitable,
[src]
G: IntoNeighbors + Visitable,
impl<G> Walker<G> for Bfs<<G as GraphBase>::NodeId, <G as Visitable>::Map> where
G: IntoNeighbors + Visitable,
[src]
G: IntoNeighbors + Visitable,
Implementors
impl<'a, G, F> Walker<&'a G> for Recursive<G, F> where
G: GraphBase,
F: FnMut(&G, G::NodeId) -> Option<(G::EdgeId, G::NodeId)>, type Item = (G::EdgeId, G::NodeId);impl<'a, G, A, B> Walker<&'a G> for Chain<G, A, B> where
G: GraphBase,
A: Walker<&'a G>,
B: Walker<&'a G, Item = A::Item>, type Item = A::Item;impl<G, W, P> Walker<G> for Filter<G, W, P> where
G: GraphRef,
W: Walker<G>,
P: FnMut(G, &W::Item) -> bool, type Item = W::Item;impl<G, W> Walker<G> for Peekable<G, W> where
G: GraphRef,
W: Walker<G>, type Item = W::Item;impl<G, W, P> Walker<G> for SkipWhile<G, W, P> where
G: GraphRef,
W: Walker<G>,
P: FnMut(G, &W::Item) -> bool, type Item = W::Item;impl<G, W, P> Walker<G> for TakeWhile<G, W, P> where
G: GraphRef,
W: Walker<G>,
P: FnMut(G, &W::Item) -> bool, type Item = W::Item;impl<G, W> Walker<G> for Skip<G, W> where
G: GraphRef,
W: Walker<G>, type Item = W::Item;impl<G, W> Walker<G> for Take<G, W> where
G: GraphRef,
W: Walker<G>, type Item = W::Item;impl<G, W> Walker<G> for Cycle<G, W> where
G: GraphRef,
W: Walker<G> + Clone, type Item = W::Item;impl<G, W, F> Walker<G> for Inspect<W, F> where
G: GraphRef,
W: Walker<G>,
F: FnMut(G, &W::Item), type Item = W::Item;impl<'a, N, E, Ix> Walker<&'a Dag<N, E, Ix>> for Children<N, E, Ix> where
Ix: IndexType, type Item = (EdgeIndex<Ix>, NodeIndex<Ix>);impl<'a, N, E, Ix> Walker<&'a Dag<N, E, Ix>> for Parents<N, E, Ix> where
Ix: IndexType, type Item = (EdgeIndex<Ix>, NodeIndex<Ix>);