pub struct Array2DView<'a, T> { /* private fields */ }Implementations§
Source§impl<T> Array2DView<'_, T>
impl<T> Array2DView<'_, T>
pub fn size(&self) -> Dims
pub fn len(&self) -> usize
pub fn dim_to_idx(&self, pos: Dims) -> Option<usize>
pub fn idx_to_dim(&self, idx: usize) -> Option<Dims>
pub fn get(&self, pos: Dims) -> Option<&T>
pub fn iter(&self) -> impl Iterator<Item = &T>
pub fn iter_pos(&self) -> impl Iterator<Item = Dims> + '_
pub fn to_array(&self) -> Array3D<T>where
T: Clone,
Trait Implementations§
Auto Trait Implementations§
impl<'a, T> Freeze for Array2DView<'a, T>
impl<'a, T> RefUnwindSafe for Array2DView<'a, T>where
T: RefUnwindSafe,
impl<'a, T> Send for Array2DView<'a, T>where
T: Sync,
impl<'a, T> Sync for Array2DView<'a, T>where
T: Sync,
impl<'a, T> Unpin for Array2DView<'a, T>
impl<'a, T> UnwindSafe for Array2DView<'a, T>where
T: RefUnwindSafe,
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more