[−][src]Trait toodee::TooDeeOpsMut
Defines operations common to both TooDee
and TooDeeViewMut
. Default implementations
are provided where possible/practical.
Required methods
fn view_mut(&mut self, start: Coordinate, end: Coordinate) -> TooDeeViewMut<T>
Returns a mutable view (or subset) of the current area based on the coordinates provided.
fn rows_mut(&mut self) -> RowsMut<T>
Returns a mutable iterator of slices, where each slice represents the entire row of the object's area.
fn col_mut(&mut self, col: usize) -> ColMut<T>
Returns a mutable iterator over a single column
Provided methods
fn cells_mut(&mut self) -> CellsMut<T>
Returns an iterator that traverses all cells within the area.
fn fill<V>(&mut self, fill: V) where
V: Borrow<T>,
T: Clone,
V: Borrow<T>,
T: Clone,
Fills the entire area with the specified value.
fn swap_cols(&mut self, c1: usize, c2: usize)
Swap/exchange the data between two columns.
fn swap_rows(&mut self, r1: usize, r2: usize)
Swap/exchange the data between two rows. Will panic if either row index is out of bounds.
fn row_pair_mut(&mut self, r1: usize, r2: usize) -> (&mut [T], &mut [T])
Return the specified rows as mutable slices.
Will panic if r1
and r2
are equal, or if either row index is out of bounds.
Implementors
impl<'a, T> TooDeeOpsMut<T> for TooDeeViewMut<'a, T>
[src]
fn view_mut(&mut self, start: Coordinate, end: Coordinate) -> TooDeeViewMut<T>
[src]
fn rows_mut(&mut self) -> RowsMut<T>
[src]
fn col_mut(&mut self, col: usize) -> ColMut<T>
[src]
impl<T> TooDeeOpsMut<T> for TooDee<T>
[src]
fn view_mut(&mut self, start: Coordinate, end: Coordinate) -> TooDeeViewMut<T>
[src]
fn rows_mut(&mut self) -> RowsMut<T>
[src]
fn col_mut(&mut self, col: usize) -> ColMut<T>
[src]
fn fill<V>(&mut self, fill: V) where
V: Borrow<T>,
T: Clone,
[src]
V: Borrow<T>,
T: Clone,