Trait petgraph::visit::IntoNeighbors
source · [−]pub trait IntoNeighbors: GraphRef {
type Neighbors: Iterator<Item = Self::NodeId>;
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 froma
.Undirected
: All other endpoints of edges connected toa
.