pub struct Grid<T> { /* private fields */ }
Implementations§
source§impl<T: Default + Clone> Grid<T>
impl<T: Default + Clone> Grid<T>
pub fn from_defaults(width: usize, height: usize) -> Self
source§impl<T> Grid<T>
impl<T> Grid<T>
pub fn from_fn( width: usize, height: usize, fun: &mut impl FnMut(usize, usize) -> T ) -> Self
pub fn width(&self) -> usize
pub fn height(&self) -> usize
pub fn map_once<U, F>(self, mapper: F) -> Grid<U>where F: FnMut(T) -> U,
pub fn map<U, F>(&self, mapper: F) -> Grid<U>where F: FnMut(&T) -> U,
Trait Implementations§
source§impl<'a, R, T: AddAssign<&'a R>> AddAssign<&'a Grid<R>> for Grid<T>
impl<'a, R, T: AddAssign<&'a R>> AddAssign<&'a Grid<R>> for Grid<T>
source§fn add_assign(&mut self, rhs: &'a Grid<R>)
fn add_assign(&mut self, rhs: &'a Grid<R>)
Performs the
+=
operation. Read moresource§impl<'a, R, T: BitAndAssign<&'a R>> BitAndAssign<&'a Grid<R>> for Grid<T>
impl<'a, R, T: BitAndAssign<&'a R>> BitAndAssign<&'a Grid<R>> for Grid<T>
source§fn bitand_assign(&mut self, rhs: &'a Grid<R>)
fn bitand_assign(&mut self, rhs: &'a Grid<R>)
Performs the
&=
operation. Read moresource§impl<'a, R, T: BitOrAssign<&'a R>> BitOrAssign<&'a Grid<R>> for Grid<T>
impl<'a, R, T: BitOrAssign<&'a R>> BitOrAssign<&'a Grid<R>> for Grid<T>
source§fn bitor_assign(&mut self, rhs: &'a Grid<R>)
fn bitor_assign(&mut self, rhs: &'a Grid<R>)
Performs the
|=
operation. Read moresource§impl<'a, R, T: BitXorAssign<&'a R>> BitXorAssign<&'a Grid<R>> for Grid<T>
impl<'a, R, T: BitXorAssign<&'a R>> BitXorAssign<&'a Grid<R>> for Grid<T>
source§fn bitxor_assign(&mut self, rhs: &'a Grid<R>)
fn bitxor_assign(&mut self, rhs: &'a Grid<R>)
Performs the
^=
operation. Read moresource§impl<'a, R, T: DivAssign<&'a R>> DivAssign<&'a Grid<R>> for Grid<T>
impl<'a, R, T: DivAssign<&'a R>> DivAssign<&'a Grid<R>> for Grid<T>
source§fn div_assign(&mut self, rhs: &'a Grid<R>)
fn div_assign(&mut self, rhs: &'a Grid<R>)
Performs the
/=
operation. Read moresource§impl<'a, R, T: MulAssign<&'a R>> MulAssign<&'a Grid<R>> for Grid<T>
impl<'a, R, T: MulAssign<&'a R>> MulAssign<&'a Grid<R>> for Grid<T>
source§fn mul_assign(&mut self, rhs: &'a Grid<R>)
fn mul_assign(&mut self, rhs: &'a Grid<R>)
Performs the
*=
operation. Read moresource§impl<'a, R, T: RemAssign<&'a R>> RemAssign<&'a Grid<R>> for Grid<T>
impl<'a, R, T: RemAssign<&'a R>> RemAssign<&'a Grid<R>> for Grid<T>
source§fn rem_assign(&mut self, rhs: &'a Grid<R>)
fn rem_assign(&mut self, rhs: &'a Grid<R>)
Performs the
%=
operation. Read moresource§impl<'a, R, T: ShlAssign<&'a R>> ShlAssign<&'a Grid<R>> for Grid<T>
impl<'a, R, T: ShlAssign<&'a R>> ShlAssign<&'a Grid<R>> for Grid<T>
source§fn shl_assign(&mut self, rhs: &'a Grid<R>)
fn shl_assign(&mut self, rhs: &'a Grid<R>)
Performs the
<<=
operation. Read moresource§impl<'a, R, T: ShrAssign<&'a R>> ShrAssign<&'a Grid<R>> for Grid<T>
impl<'a, R, T: ShrAssign<&'a R>> ShrAssign<&'a Grid<R>> for Grid<T>
source§fn shr_assign(&mut self, rhs: &'a Grid<R>)
fn shr_assign(&mut self, rhs: &'a Grid<R>)
Performs the
>>=
operation. Read more