petgraph::visit

Trait IntoEdgesDirected

Source
pub trait IntoEdgesDirected: IntoEdges + IntoNeighborsDirected {
    type EdgesDirected: Iterator<Item = Self::EdgeRef>;

    // Required method
    fn edges_directed(
        self,
        a: Self::NodeId,
        dir: Direction,
    ) -> Self::EdgesDirected;
}
Expand description

Access to all edges of each node, in the specified direction.

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

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

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

Required Associated Types§

Required Methods§

Source

fn edges_directed(self, a: Self::NodeId, dir: Direction) -> Self::EdgesDirected

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> IntoEdgesDirected for &'a G

Implementors§

Source§

impl<'a, 'b, G> IntoEdgesDirected for &'b Frozen<'a, G>

Source§

impl<'a, G, F> IntoEdgesDirected for &'a EdgeFiltered<G, F>

Source§

impl<'a, G, F> IntoEdgesDirected for &'a NodeFiltered<G, F>

Source§

impl<'a, N, E, Null: Nullable<Wrapped = E>, Ix: IndexType> IntoEdgesDirected for &'a MatrixGraph<N, E, Directed, Null, Ix>

Source§

type EdgesDirected = Edges<'a, Directed, Null, Ix>

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

impl<G> IntoEdgesDirected for Reversed<G>