pub trait Undirected: GraphType {
type NeighIt<'a>: GraphIterator<Self, Item = (Self::Edge<'a>, Self::Node<'a>)>
where Self: 'a;
// Required method
fn neigh_iter(&self, u: Self::Node<'_>) -> Self::NeighIt<'_>;
// Provided methods
fn neighs(
&self,
u: Self::Node<'_>,
) -> GraphIter<'_, Self, <Self as Undirected>::NeighIt<'_>> ⓘ
where Self: Sized { ... }
fn neighbors(&self) -> Neighbors<'_, Self>
where Self: Sized { ... }
}
Expand description
A graph with list access to undirected incident edges.
Required Associated Types§
Sourcetype NeighIt<'a>: GraphIterator<Self, Item = (Self::Edge<'a>, Self::Node<'a>)>
where
Self: 'a
type NeighIt<'a>: GraphIterator<Self, Item = (Self::Edge<'a>, Self::Node<'a>)> where Self: 'a
Type of a graph iterator over all incident edges.
Required Methods§
Sourcefn neigh_iter(&self, u: Self::Node<'_>) -> Self::NeighIt<'_>
fn neigh_iter(&self, u: Self::Node<'_>) -> Self::NeighIt<'_>
Return a graph iterator over the edges adjacent to some node.
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.