Trait petgraph::visit::IntoNeighbors [] [src]

pub trait IntoNeighbors: GraphRef {
    type Neighbors: Iterator<Item = Self::NodeId>;
    fn neighbors(self, a: Self::NodeId) -> Self::Neighbors;

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.

Associated Types

Required Methods

Return an iterator of the neighbors of node a.

Implementations on Foreign Types

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