Struct gridsim::moore::Neighbors[][src]

pub struct Neighbors<T> {
    pub right: T,
    pub up: T,
    pub left: T,
    pub down: T,
}

Fields

Trait Implementations

impl<T: Copy> Copy for Neighbors<T>
[src]

impl<T: Clone> Clone for Neighbors<T>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<T: Debug> Debug for Neighbors<T>
[src]

Formats the value using the given formatter. Read more

impl<T: Default> Default for Neighbors<T>
[src]

Returns the "default value" for a type. Read more

impl<T> Index<Direction> for Neighbors<T>
[src]

The returned type after indexing.

Performs the indexing (container[index]) operation.

impl<T> IndexMut<Direction> for Neighbors<T>
[src]

Performs the mutable indexing (container[index]) operation.

impl<T> Neighborhood<T> for Neighbors<T>
[src]

Iterate over all neighbor cells.

Iterate over all neighbor cells with their directions.

impl<'a, T> From<Neighbors<&'a T>> for Neighbors<T> where
    T: Clone
[src]

Performs the conversion.

impl<'a, C, S> GetNeighbors<'a, usize, Neighbors<&'a C>> for SquareGrid<'a, S> where
    S: Sim<'a, Cell = C>, 
[src]

impl<'a, S, M> TakeMoveNeighbors<usize, Neighbors<M>> for SquareGrid<'a, S> where
    S: Sim<'a, Move = M, MoveNeighbors = Neighbors<M>>, 
[src]

This should be called exactly once for every index, making it unsafe. Read more

Auto Trait Implementations

impl<T> Send for Neighbors<T> where
    T: Send

impl<T> Sync for Neighbors<T> where
    T: Sync