pub struct Array2D<T> { /* private fields */ }Implementations§
Source§impl<T: Default + Clone> Array2D<T>
impl<T: Default + Clone> Array2D<T>
pub fn new(width: usize, height: usize) -> Self
pub fn populate_array_with_data(&mut self, data: Vec<T>) -> Result<(), &str>
pub fn get_size(&self) -> usize
pub fn get_height(&self) -> usize
pub fn get_width(&self) -> usize
pub fn get_value_at(&self, row: usize, column: usize) -> Result<T, &str>where
T: Copy,
pub fn set_value_at(&mut self, row: usize, column: usize, data: T)
pub fn get_index(&self, row: usize, column: usize) -> usize
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for Array2D<T>
impl<T> RefUnwindSafe for Array2D<T>where
T: RefUnwindSafe,
impl<T> Send for Array2D<T>where
T: Send,
impl<T> Sync for Array2D<T>where
T: Sync,
impl<T> Unpin for Array2D<T>where
T: Unpin,
impl<T> UnwindSafe for Array2D<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