pub struct Grid<T> { /* private fields */ }Expand description
Two-dimensional, non-resizeable, zero-indexed grid.
Implementations§
Source§impl<T> Grid<T>where
T: Copy,
impl<T> Grid<T>where
T: Copy,
Source§impl<T> Grid<T>
impl<T> Grid<T>
Sourcepub fn get_mut(&mut self, coord: Coord) -> Option<&mut T>
pub fn get_mut(&mut self, coord: Coord) -> Option<&mut T>
Get a mutable reference to some cell.
Sourcepub fn rget(&self, anchor: Coord, vec: Offset) -> Option<&T>
pub fn rget(&self, anchor: Coord, vec: Offset) -> Option<&T>
Get an immutable reference to the cell with the given positional relationship to the provided coordinate.
Sourcepub fn rget_mut(&mut self, anchor: Coord, vec: Offset) -> Option<&mut T>
pub fn rget_mut(&mut self, anchor: Coord, vec: Offset) -> Option<&mut T>
Get a mutable reference to the cell with the given positional relationship to the provided coordinate.
Trait Implementations§
Source§impl<T: Ord> Ord for Grid<T>
impl<T: Ord> Ord for Grid<T>
Source§impl<T: PartialOrd> PartialOrd for Grid<T>
impl<T: PartialOrd> PartialOrd for Grid<T>
impl<T: Eq> Eq for Grid<T>
impl<T> StructuralPartialEq for Grid<T>
Auto Trait Implementations§
impl<T> Freeze for Grid<T>
impl<T> RefUnwindSafe for Grid<T>where
T: RefUnwindSafe,
impl<T> Send for Grid<T>where
T: Send,
impl<T> Sync for Grid<T>where
T: Sync,
impl<T> Unpin for Grid<T>where
T: Unpin,
impl<T> UnwindSafe for Grid<T>where
T: UnwindSafe,
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