pub trait UndirectedNeighbors<NI: Idx> {
type NeighborsIterator<'a>: Iterator<Item = &'a NI>
where Self: 'a;
// Required method
fn neighbors(&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 NI> where Self: 'a
Required Methods§
Sourcefn neighbors(&self, node: NI) -> Self::NeighborsIterator<'_>
fn neighbors(&self, node: NI) -> Self::NeighborsIterator<'_>
Returns an iterator of all nodes connected to the given node.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".