Struct oxygengine_utils::grid_2d::Grid2dNeighborSample
source · [−]pub struct Grid2dNeighborSample<T> { /* private fields */ }
Implementations
sourceimpl<T> Grid2dNeighborSample<T>where
T: Clone,
impl<T> Grid2dNeighborSample<T>where
T: Clone,
pub fn cols(&self) -> usize
pub fn rows(&self) -> usize
pub fn size(&self) -> (usize, usize)
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn cells(&self) -> &[T]ⓘNotable traits for &[u8]impl Read for &[u8]impl Write for &mut [u8]
pub fn cell(&self, col: usize, row: usize) -> Option<&T>
pub fn cell_mut(&mut self, col: usize, row: usize) -> Option<&mut T>
pub fn get(&self, col: usize, row: usize) -> Option<T>
pub fn set(&mut self, col: usize, row: usize, value: T)
pub fn map<F, R>(&self, f: F) -> Grid2dNeighborSample<R>where
F: FnMut(usize, usize, &T) -> R,
R: Default + Copy,
pub fn with<F>(&mut self, f: F)where
F: FnMut(usize, usize, &T) -> T,
pub fn iter(&self) -> impl DoubleEndedIterator<Item = &T>
pub fn iter_mut(&mut self) -> impl DoubleEndedIterator<Item = &mut T>
Trait Implementations
sourceimpl<T: Debug> Debug for Grid2dNeighborSample<T>
impl<T: Debug> Debug for Grid2dNeighborSample<T>
sourceimpl<I, T> From<(usize, I)> for Grid2dNeighborSample<T>where
I: Iterator<Item = T>,
T: Default + Copy,
impl<I, T> From<(usize, I)> for Grid2dNeighborSample<T>where
I: Iterator<Item = T>,
T: Default + Copy,
Auto Trait Implementations
impl<T> RefUnwindSafe for Grid2dNeighborSample<T>where
T: RefUnwindSafe,
impl<T> Send for Grid2dNeighborSample<T>where
T: Send,
impl<T> Sync for Grid2dNeighborSample<T>where
T: Sync,
impl<T> Unpin for Grid2dNeighborSample<T>where
T: Unpin,
impl<T> UnwindSafe for Grid2dNeighborSample<T>where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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