pub struct BoolGrid {
pub width: usize,
pub height: usize,
pub values: Vec<u64>,
}
Fields§
§width: usize
§height: usize
§values: Vec<u64>
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for BoolGrid
impl<'de> Deserialize<'de> for BoolGrid
Source§fn 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
Source§impl 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)
Source§fn 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
Source§fn point_in_bounds(&self, point: Point) -> bool
fn point_in_bounds(&self, point: Point) -> bool
Tests whether a point is in bounds.
Source§fn 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 Freeze for BoolGrid
impl RefUnwindSafe for BoolGrid
impl Send for BoolGrid
impl Sync for BoolGrid
impl Unpin for BoolGrid
impl UnwindSafe for BoolGrid
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more