petgraph::visit

Trait IntoNeighborsDirected

Source
pub trait IntoNeighborsDirected: IntoNeighbors {
    type NeighborsDirected: Iterator<Item = Self::NodeId>;

    // Required method
    fn neighbors_directed(
        self,
        n: Self::NodeId,
        d: Direction,
    ) -> Self::NeighborsDirected;
}
Expand description

Access to the neighbors of each node, through incoming or outgoing edges.

Depending on the graph’s edge type, the neighbors of a given directionality are:

  • Directed, Outgoing: All targets of edges from a.
  • Directed, Incoming: All sources of edges to a.
  • Undirected: All other endpoints of edges connected to a.

Required Associated Types§

Required Methods§

Source

fn neighbors_directed( self, n: Self::NodeId, d: Direction, ) -> Self::NeighborsDirected

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

Implementors§