pub trait UndirectedRef<'a>: GraphTypeRef<'a> {
    type NeighIt: GraphIterator<Self, Item = (Self::Edge, Self::Node)>;

    // Required method
    fn neigh_iter(&self, u: Self::Node) -> Self::NeighIt;

    // Provided method
    fn neighs(&self, u: Self::Node) -> GraphIter<'_, Self, Self::NeighIt> 
       where Self: Sized { ... }
}
Expand description

A reference to an undirected graph.

This trait contains methods with a unrestricted lifetime for self.

Required Associated Types§

source

type NeighIt: GraphIterator<Self, Item = (Self::Edge, Self::Node)>

Type of a graph iterator over all incident edges.

Required Methods§

source

fn neigh_iter(&self, u: Self::Node) -> Self::NeighIt

Return a graph iterator over the edges adjacent to some node.

Provided Methods§

source

fn neighs(&self, u: Self::Node) -> GraphIter<'_, Self, Self::NeighIt> where Self: Sized,

Return an iterator over the edges adjacent to some node.

Implementations on Foreign Types§

source§

impl<'a, G> UndirectedRef<'a> for &'a Gwhere G: Undirected,

§

type NeighIt = WrapIt<<G as Undirected>::NeighIt<'a>>

source§

fn neigh_iter(&self, u: Self::Node) -> Self::NeighIt

source§

impl<'a, G> UndirectedRef<'a> for NonNull<G>where G: Undirected + 'a,

§

type NeighIt = WrapIt<<G as Undirected>::NeighIt<'a>>

source§

fn neigh_iter(&self, u: Self::Node) -> Self::NeighIt

Implementors§

source§

impl<'a, G> UndirectedRef<'a> for Network<'a, G>where G: Undirected,

source§

impl<'a, G> UndirectedRef<'a> for ReverseDigraph<'a, G>where G: UndirectedRef<'a>,

§

type NeighIt = ReverseWrapIt<<G as UndirectedRef<'a>>::NeighIt>