Trait UndirectedRef

Source
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.

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.

Implementations on Foreign Types§

Source§

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

Source§

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,

Source§

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>,

Source§

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