pub struct Grid2dNeighborSample<T> { /* private fields */ }
Implementations§
source§impl<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]
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
pub fn iter_mut(&mut self) -> impl DoubleEndedIterator
Trait Implementations§
source§impl<T> Debug for Grid2dNeighborSample<T>where
T: Debug,
impl<T> Debug for Grid2dNeighborSample<T>where T: Debug,
source§impl<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,
source§fn from(_: (usize, I)) -> Grid2dNeighborSample<T>
fn from(_: (usize, I)) -> Grid2dNeighborSample<T>
Converts to this type from the input type.
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§
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