Trait Neighbors

Source
pub trait Neighbors: Sized {
    type Iter<'a>: 'a + Iterator<Item = Internode<Self>>
       where Self: 'a;

    // Required methods
    fn outgoing(&self) -> Self::Iter<'_>;
    fn incoming(&self) -> Self::Iter<'_>;
}
Expand description

Defines neighbors of a node.

Required Associated Types§

Source

type Iter<'a>: 'a + Iterator<Item = Internode<Self>> where Self: 'a

Required Methods§

Source

fn outgoing(&self) -> Self::Iter<'_>

Returns an iterator over the outgoing neighbors of this node.

Source

fn incoming(&self) -> Self::Iter<'_>

Returns an iterator over the incoming neighbors of this node.

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.

Implementors§