pub trait Adjacencies<'a> {
    type Node: Copy + Eq + 'a;
    type Edge: Copy + Eq + 'a;
    type IncidenceIt: GraphIterator<Self, Item = (Self::Edge, Self::Node)>;

    // Required method
    fn neigh_iter(&self, u: Self::Node) -> Self::IncidenceIt;

    // Provided methods
    fn neighs<'b>(
        &'b self,
        u: Self::Node
    ) -> GraphIter<'b, Self, Self::IncidenceIt> 
       where Self: Sized,
             'a: 'b { ... }
    fn filter<P>(self, predicate: P) -> FilterAdjacencies<Self, P>
       where Self: Sized,
             P: for<'r> Fn(&'r (Self::Edge, Self::Node)) -> bool { ... }
}

Required Associated Types§

source

type Node: Copy + Eq + 'a

source

type Edge: Copy + Eq + 'a

source

type IncidenceIt: GraphIterator<Self, Item = (Self::Edge, Self::Node)>

Required Methods§

source

fn neigh_iter(&self, u: Self::Node) -> Self::IncidenceIt

Provided Methods§

source

fn neighs<'b>(&'b self, u: Self::Node) -> GraphIter<'b, Self, Self::IncidenceIt> where Self: Sized, 'a: 'b,

source

fn filter<P>(self, predicate: P) -> FilterAdjacencies<Self, P>where Self: Sized, P: for<'r> Fn(&'r (Self::Edge, Self::Node)) -> bool,

Implementations on Foreign Types§

source§

impl<'a, A> Adjacencies<'a> for &'a Awhere A: Adjacencies<'a>,

Implement Adjacencies for references.

§

type Node = <A as Adjacencies<'a>>::Node

§

type Edge = <A as Adjacencies<'a>>::Edge

§

type IncidenceIt = AdjacenciesWrapIt<<A as Adjacencies<'a>>::IncidenceIt>

source§

fn neigh_iter(&self, u: Self::Node) -> Self::IncidenceIt

Implementors§

source§

impl<'a, 'g: 'a, G> Adjacencies<'a> for InEdges<'g, G>where G: Directed,

§

type Node = <G as GraphType>::Node<'a>

§

type Edge = <G as GraphType>::Edge<'a>

§

type IncidenceIt = AdjacenciesWrapIt<<G as Directed>::InIt<'a>>

source§

impl<'a, 'g: 'a, G> Adjacencies<'a> for Neighbors<'g, G>where G: Undirected,

§

type Node = <G as GraphType>::Node<'a>

§

type Edge = <G as GraphType>::Edge<'a>

§

type IncidenceIt = AdjacenciesWrapIt<<G as Undirected>::NeighIt<'a>>

source§

impl<'a, 'g: 'a, G> Adjacencies<'a> for OutEdges<'g, G>where G: Directed,

§

type Node = <G as GraphType>::Node<'a>

§

type Edge = <G as GraphType>::Edge<'a>

§

type IncidenceIt = AdjacenciesWrapIt<<G as Directed>::OutIt<'a>>

source§

impl<'a, A, P> Adjacencies<'a> for FilterAdjacencies<A, P>where A: Adjacencies<'a>, P: 'a + Clone + for<'r> Fn(&'r (A::Edge, A::Node)) -> bool,

§

type Node = <A as Adjacencies<'a>>::Node

§

type Edge = <A as Adjacencies<'a>>::Edge

§

type IncidenceIt = Filtered<<A as Adjacencies<'a>>::IncidenceIt>

source§

impl<'a, N, E, Ne, NeIt> Adjacencies<'a> for FnAdj<N, E, Ne, NeIt>where N: Copy + Eq + 'a, E: Copy + Eq + 'a, Ne: Fn(N) -> NeIt, NeIt: Iterator<Item = (E, N)> + Clone,

§

type Node = N

§

type Edge = E

§

type IncidenceIt = FnNeighIt<NeIt>