Fields
width: usize
height: usize
values: Vec<u64>
Implementations
Trait Implementations
sourceimpl<'de> Deserialize<'de> for BoolGrid
impl<'de> Deserialize<'de> for BoolGrid
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl Grid<bool> for BoolGrid
impl Grid<bool> for BoolGrid
fn new(width: usize, height: usize, default_value: bool) -> Self
fn get(&self, x: usize, y: usize) -> bool
fn set(&mut self, x: usize, y: usize, value: bool)
fn width(&self) -> usize
fn height(&self) -> usize
fn get_point(&self, point: Point) -> T
fn set_point(&mut self, point: Point, value: T)
sourcefn get_ix(&self, x: usize, y: usize) -> usize
fn get_ix(&self, x: usize, y: usize) -> usize
Gets the index corresponding to a coordinate, which is row-wise.
fn get_ix_point(&self, point: &Point) -> usize
sourcefn point_in_bounds(&self, point: Point) -> bool
fn point_in_bounds(&self, point: Point) -> bool
Tests whether a point is in bounds.
sourcefn index_in_bounds(&self, x: usize, y: usize) -> bool
fn index_in_bounds(&self, x: usize, y: usize) -> bool
Tests whether an index is in bounds.
sourcefn set_rectangle(&mut self, rect: &Rect, value: T)
fn set_rectangle(&mut self, rect: &Rect, value: T)
Sets a given rectangle on the grid to the value.
Auto Trait Implementations
impl RefUnwindSafe for BoolGrid
impl Send for BoolGrid
impl Sync for BoolGrid
impl Unpin for BoolGrid
impl UnwindSafe for BoolGrid
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more