pub trait DirectedRef<'a>: UndirectedRef<'a> {
    type OutIt: GraphIterator<Self, Item = (Self::Edge, Self::Node)>;
    type InIt: GraphIterator<Self, Item = (Self::Edge, Self::Node)>;
    type IncidentIt: GraphIterator<Self, Item = (Self::DirectedEdge, Self::Node)>;
    type DirectedEdge: DirectedEdge<Edge = Self::Edge> + Copy + Eq;

    // Required methods
    fn out_iter(&self, u: Self::Node) -> Self::OutIt;
    fn in_iter(&self, u: Self::Node) -> Self::InIt;
    fn incident_iter(&self, u: Self::Node) -> Self::IncidentIt;

    // Provided methods
    fn outedges(&self, u: Self::Node) -> GraphIter<'_, Self, Self::OutIt> 
       where Self: Sized { ... }
    fn inedges(&self, u: Self::Node) -> GraphIter<'_, Self, Self::InIt> 
       where Self: Sized { ... }
    fn incident_edges(
        &self,
        u: Self::Node
    ) -> GraphIter<'_, Self, Self::IncidentIt> 
       where Self: Sized { ... }
}
Expand description

A reference to a digraph.

This trait contains methods with a unrestricted lifetime for self.

Required Associated Types§

source

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

Type of a graph iterator over edges leaving a node.

source

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

Type of a graph iterator over edges entering a node.

source

type IncidentIt: GraphIterator<Self, Item = (Self::DirectedEdge, Self::Node)>

Type of an iterator over all incident edges.

source

type DirectedEdge: DirectedEdge<Edge = Self::Edge> + Copy + Eq

Type of a directed edge.

Required Methods§

source

fn out_iter(&self, u: Self::Node) -> Self::OutIt

Return the source node of an edge. Return the sink node of an edge. Return a graph iterator over the edges leaving a node.

source

fn in_iter(&self, u: Self::Node) -> Self::InIt

Return a graph iterator over the edges leaving a node.

source

fn incident_iter(&self, u: Self::Node) -> Self::IncidentIt

Return an iterator over all directed edges incident with a node.

Provided Methods§

source

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

Return an iterator over the edges leaving a node.

source

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

Return an iterator over the edges leaving a node.

source

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

Return an iterator over all directed edges incident with a node.

Implementations on Foreign Types§

source§

impl<'a, G> DirectedRef<'a> for &'a Gwhere G: Directed,

§

type OutIt = WrapIt<<G as Directed>::OutIt<'a>>

§

type InIt = WrapIt<<G as Directed>::InIt<'a>>

§

type IncidentIt = WrapIt<<G as Directed>::IncidentIt<'a>>

§

type DirectedEdge = <G as Directed>::DirectedEdge<'a>

source§

fn out_iter(&self, u: Self::Node) -> Self::OutIt

source§

fn in_iter(&self, u: Self::Node) -> Self::InIt

source§

fn incident_iter(&self, u: Self::Node) -> Self::IncidentIt

source§

impl<'a, G> DirectedRef<'a> for NonNull<G>where G: Directed + 'a,

§

type OutIt = WrapIt<<G as Directed>::OutIt<'a>>

§

type InIt = WrapIt<<G as Directed>::InIt<'a>>

§

type IncidentIt = WrapIt<<G as Directed>::IncidentIt<'a>>

§

type DirectedEdge = <G as Directed>::DirectedEdge<'a>

source§

fn out_iter(&self, u: Self::Node) -> Self::OutIt

source§

fn in_iter(&self, u: Self::Node) -> Self::InIt

source§

fn incident_iter(&self, u: Self::Node) -> Self::IncidentIt

Implementors§

source§

impl<'a, G> DirectedRef<'a> for Network<'a, G>where G: 'a + Directed,

source§

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

§

type OutIt = ReverseWrapIt<<G as DirectedRef<'a>>::InIt>

§

type InIt = ReverseWrapIt<<G as DirectedRef<'a>>::OutIt>

§

type IncidentIt = ReverseIncidentIt<<G as DirectedRef<'a>>::IncidentIt>

§

type DirectedEdge = ReverseDirectedEdge<<G as DirectedRef<'a>>::DirectedEdge>