Skip to main content

IncomingNeighborsGraph

Trait IncomingNeighborsGraph 

Source
pub trait IncomingNeighborsGraph: ElementPredecessors {
    type InNeighbors<'view>: Iterator<Item = Self::ElementId>
       where Self: 'view;

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

Capability for traversing directly preceding incoming neighbor nodes.

Graph-facing name for ElementPredecessors. Answers node -> predecessor nodes without requiring callers to materialize incoming edge IDs and resolve each edge source.

Required Associated Types§

Source

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

Iterator over nodes that have incoming edges to one target node.

Required Methods§

Source

fn incoming_neighbors(&self, node: Self::ElementId) -> Self::InNeighbors<'_>

Returns predecessor nodes with incoming edges to node.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§

Source§

impl<T> IncomingNeighborsGraph for T

Source§

type InNeighbors<'view> = <T as ElementPredecessors>::Predecessors<'view> where T: 'view