pub struct WrappingVec2d<T> { /* private fields */ }
Expand description
Adds methods to access elements through wrapping indices, such as [0][-1]
for the last
element in the first row.
Implementations§
Source§impl<T> WrappingVec2d<T>
impl<T> WrappingVec2d<T>
pub fn mut_array(&mut self) -> &mut Vec2d<T>
pub fn array(&self) -> &Vec2d<T>
pub fn count_cols(&self) -> isize
pub fn count_rows(&self) -> isize
pub fn get_col_index(&self, col: isize) -> usize
pub fn get_row_index(&self, row: isize) -> usize
pub fn index<'a>(&'a self, row: isize, col: isize) -> &'a T
pub fn index_mut<'a>(&'a mut self, row: isize, col: isize) -> &'a mut T
Source§impl<T: Copy> WrappingVec2d<T>
impl<T: Copy> WrappingVec2d<T>
pub fn from(width: usize, data: &[T]) -> WrappingVec2d<T>
pub fn from_vec2d(data: Vec2d<T>) -> WrappingVec2d<T>
Auto Trait Implementations§
impl<T> Freeze for WrappingVec2d<T>
impl<T> RefUnwindSafe for WrappingVec2d<T>where
T: RefUnwindSafe,
impl<T> Send for WrappingVec2d<T>where
T: Send,
impl<T> Sync for WrappingVec2d<T>where
T: Sync,
impl<T> Unpin for WrappingVec2d<T>where
T: Unpin,
impl<T> UnwindSafe for WrappingVec2d<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