Skip to main content

OutgoingNeighborsGraph

Trait OutgoingNeighborsGraph 

Source
pub trait OutgoingNeighborsGraph: ElementSuccessors {
    type OutNeighbors<'view>: Iterator<Item = Self::ElementId>
       where Self: 'view;

    // Required method
    fn outgoing_neighbors(
        &self,
        node: Self::ElementId,
    ) -> Self::OutNeighbors<'_>;
}
Expand description

Capability for traversing directly reachable outgoing neighbor nodes.

Graph-facing name for ElementSuccessors. Answers node -> successor nodes without requiring callers to materialize outgoing edge IDs and resolve each edge target. Implementations define whether parallel edges produce repeated neighbor nodes; those that preserve graph edge order and multiplicity should document that behavior.

Required Associated Types§

Source

type OutNeighbors<'view>: Iterator<Item = Self::ElementId> where Self: 'view

Iterator over nodes directly reachable from one source node.

Required Methods§

Source

fn outgoing_neighbors(&self, node: Self::ElementId) -> Self::OutNeighbors<'_>

Returns neighbor nodes reached by outgoing edges from node.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<T> OutgoingNeighborsGraph for T

Source§

type OutNeighbors<'view> = <T as ElementSuccessors>::Successors<'view> where T: 'view