[][src]Struct dcconway::grid::Grid

pub struct Grid { /* fields omitted */ }

Methods

impl Grid[src]

pub fn empty() -> Self[src]

pub fn new(alive_states: HashSet<GridPosition>) -> Self[src]

pub fn is_live(&self, pos: GridPosition) -> bool[src]

pub fn is_dead(&self, pos: GridPosition) -> bool[src]

pub fn neighbour_count(&self, pos: GridPosition) -> usize[src]

pub fn mark_as_alive<P: Into<GridPosition>>(&mut self, into_pos: P)[src]

pub fn mark_as_dead<P: Into<GridPosition>>(&mut self, into_pos: P)[src]

pub fn alive_positions_iter(&self) -> impl Iterator<Item = &GridPosition>[src]

pub fn neighbour_count_iter(
    &self
) -> impl Iterator<Item = (&GridPosition, &usize)>
[src]

Trait Implementations

impl Clone for Grid[src]

impl Debug for Grid[src]

Auto Trait Implementations

impl RefUnwindSafe for Grid

impl Send for Grid

impl Sync for Grid

impl Unpin for Grid

impl UnwindSafe for Grid

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.