[][src]Trait spacebattleship::board::NeighborIterState

pub trait NeighborIterState {
    type Dimensions: Dimensions + ?Sized;
    fn start(
        dim: &Self::Dimensions,
        coord: <Self::Dimensions as Dimensions>::Coordinate
    ) -> Self;
fn next(
        &mut self,
        dim: &Self::Dimensions
    ) -> Option<<Self::Dimensions as Dimensions>::Coordinate>; }

State type for the neighbor iterator.

Associated Types

Loading content...

Required methods

fn start(
    dim: &Self::Dimensions,
    coord: <Self::Dimensions as Dimensions>::Coordinate
) -> Self

Construct an instance of this iter state given the arguments.

fn next(
    &mut self,
    dim: &Self::Dimensions
) -> Option<<Self::Dimensions as Dimensions>::Coordinate>

Get the next item given a reference to the parent type.

Loading content...

Implementors

impl NeighborIterState for RectNeighbors[src]

Loading content...