Trait graph::prelude::UndirectedNeighborsWithValues
source · pub trait UndirectedNeighborsWithValues<NI, EV>where
NI: Idx,{
type NeighborsIterator<'a>: Iterator<Item = &'a Target<NI, EV>>
where Self: 'a,
EV: 'a;
// Required method
fn neighbors_with_values(&self, node: NI) -> Self::NeighborsIterator<'_>;
}
Expand description
Returns the neighbors of a given node.
The edge (42, 1337)
is equivalent to the edge (1337, 42)
.
Required Associated Types§
type NeighborsIterator<'a>: Iterator<Item = &'a Target<NI, EV>> where Self: 'a, EV: 'a
Required Methods§
sourcefn neighbors_with_values(&self, node: NI) -> Self::NeighborsIterator<'_>
fn neighbors_with_values(&self, node: NI) -> Self::NeighborsIterator<'_>
Returns an iterator of all nodes connected to the given node including the value of the connecting edge.
Object Safety§
This trait is not object safe.