Struct petgraph::graph::Neighbors
[−]
[src]
pub struct Neighbors<'a, E: 'a, Ix: 'a = DefIndex> where Ix: IndexType {
// some fields omitted
}Iterator over the neighbors of a node.
Iterator element type is NodeIndex<Ix>.
Created with .neighbors(), .neighbors_directed() or
.neighbors_undirected().
Methods
impl<'a, E, Ix> Neighbors<'a, E, Ix> where Ix: IndexType
fn detach(&self) -> WalkNeighbors<Ix>
Return a “walker” object that can be used to step through the neighbors and edges from the origin node.
Note: The walker does not borrow from the graph, this is to allow mixing edge walking with mutating the graph's weights.