petgraph::visit

Trait IntoEdges

Source
pub trait IntoEdges: IntoEdgeReferences + IntoNeighbors {
    type Edges: Iterator<Item = Self::EdgeRef>;

    // Required method
    fn edges(self, a: Self::NodeId) -> Self::Edges;
}
Expand description

Access to the edges of each node.

The edges are, depending on the graph’s edge type:

  • Directed: All edges from a.
  • Undirected: All edges connected to a, with a being the source of each edge.

This is an extended version of the trait IntoNeighbors; the former only iterates over the target node identifiers, while this trait yields edge references (trait EdgeRef).

Required Associated Types§

Source

type Edges: Iterator<Item = Self::EdgeRef>

Required Methods§

Source

fn edges(self, a: Self::NodeId) -> Self::Edges

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> IntoEdges for &'a G
where G: IntoEdges,

Source§

type Edges = <G as IntoEdges>::Edges

Source§

fn edges(self, a: Self::NodeId) -> Self::Edges

Implementors§

Source§

impl<'a, 'b, G> IntoEdges for &'b Frozen<'a, G>
where G: IntoEdges,

Source§

impl<'a, G, F> IntoEdges for &'a EdgeFiltered<G, F>
where G: IntoEdges, F: FilterEdge<G::EdgeRef>,

Source§

impl<'a, G, F> IntoEdges for &'a NodeFiltered<G, F>
where G: IntoEdges, F: FilterNode<G::NodeId>,

Source§

impl<'a, Ix: IndexType, E> IntoEdges for &'a List<E, Ix>

Source§

impl<'a, N, E, Ty, Ix> IntoEdges for &'a Csr<N, E, Ty, Ix>
where Ty: EdgeType, Ix: IndexType,

Source§

type Edges = Edges<'a, E, Ty, Ix>

Source§

impl<'a, N, E, Ty, Ix> IntoEdges for &'a Graph<N, E, Ty, Ix>
where Ty: EdgeType, Ix: IndexType,

Source§

type Edges = Edges<'a, E, Ty, Ix>

Source§

impl<'a, N, E: 'a, Ty, S> IntoEdges for &'a GraphMap<N, E, Ty, S>
where N: NodeTrait + 'a, Ty: EdgeType, S: BuildHasher,

Source§

type Edges = Edges<'a, N, E, Ty, S>

Source§

impl<G> IntoEdges for Reversed<G>