pub trait IntoNeighbors: GraphRef {
    type Neighbors: Iterator<Item = Self::NodeId>;

    // Required method
    fn neighbors(self, a: Self::NodeId) -> Self::Neighbors;
}
Expand description

Access to the neighbors of each node

The neighbors are, depending on the graph’s edge type:

  • Directed: All targets of edges from a.
  • Undirected: All other endpoints of edges connected to a.

Required Associated Types§

source

type Neighbors: Iterator<Item = Self::NodeId>

Required Methods§

source

fn neighbors(self, a: Self::NodeId) -> Self::Neighbors

Return an iterator of the neighbors of node a.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<'a, G> IntoNeighbors for &'a G
where G: IntoNeighbors,

Implementors§

source§

impl<'a, 'b, G> IntoNeighbors for &'b Frozen<'a, G>
where G: IntoNeighbors,

source§

impl<'a, E, Ix> IntoNeighbors for &'a List<E, Ix>
where Ix: IndexType,

§

type Neighbors = Neighbors<'a, E, Ix>

source§

impl<'a, G, F> IntoNeighbors for &'a EdgeFiltered<G, F>

source§

impl<'a, G, F> IntoNeighbors for &'a NodeFiltered<G, F>
where G: IntoNeighbors, F: FilterNode<<G as GraphBase>::NodeId>,

source§

impl<'a, N, E, Ty> IntoNeighbors for &'a GraphMap<N, E, Ty>
where N: 'a + Copy + Ord + Hash, Ty: EdgeType,

§

type Neighbors = Neighbors<'a, N, Ty>

source§

impl<'a, N, E, Ty, Ix> IntoNeighbors for &'a Csr<N, E, Ty, Ix>
where Ty: EdgeType, Ix: IndexType,

§

type Neighbors = Neighbors<'a, Ix>

source§

impl<'a, N, E, Ty, Ix> IntoNeighbors for &'a StableGraph<N, E, Ty, Ix>
where E: 'a, Ty: EdgeType, Ix: IndexType,

§

type Neighbors = Neighbors<'a, E, Ix>

source§

impl<'a, N, E, Ty, Ix> IntoNeighbors for &'a Graph<N, E, Ty, Ix>
where E: 'a, Ty: EdgeType, Ix: IndexType,

§

type Neighbors = Neighbors<'a, E, Ix>

source§

impl<'a, N, E, Ty, Null, Ix> IntoNeighbors for &'a MatrixGraph<N, E, Ty, Null, Ix>
where E: 'a, Ty: EdgeType, Null: Nullable<Wrapped = E>, Ix: IndexType,

§

type Neighbors = Neighbors<'a, Ty, Null, Ix>

source§

impl<G> IntoNeighbors for Reversed<G>