[−][src]Struct dcconway::grid::Grid
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]
&self
) -> impl Iterator<Item = (&GridPosition, &usize)>
Trait Implementations
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,