Trait gridsim::Neighborhood[][src]

pub trait Neighborhood<T> {
    type Direction: Direction;
    type Iter: Iterator<Item = T>;
    type DirIter: Iterator<Item = (Self::Direction, T)>;
    fn new<F: FnMut(Self::Direction) -> T>(_: F) -> Self;
fn iter(self) -> Self::Iter;
fn dir_iter(self) -> Self::DirIter; }

A Neighborhood contains all of your neighbors, which are each in their own Direction.

Associated Types

Required Methods

Iterate over all neighbor cells.

Iterate over all neighbor cells with their directions.

Implementors