[][src]Trait toodee::TooDeeOpsMut

pub trait TooDeeOpsMut<T>: TooDeeOps<T> + IndexMut<usize> {
    fn view_mut(
        &mut self,
        start: Coordinate,
        end: Coordinate
    ) -> TooDeeViewMut<T>;
fn rows_mut(&mut self) -> RowsMut<T>;
fn col_mut(&mut self, col: usize) -> ColMut<T>; fn cells_mut(&mut self) -> CellsMut<T> { ... }
fn fill<V>(&mut self, fill: V)
    where
        V: Borrow<T>,
        T: Clone
, { ... }
fn swap_cols(&mut self, c1: usize, c2: usize) { ... }
fn swap_rows(&mut self, r1: usize, r2: usize) { ... }
fn row_pair_mut(&mut self, r1: usize, r2: usize) -> (&mut [T], &mut [T]) { ... } }

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

Loading content...

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

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.

Loading content...

Implementors

impl<'a, T> TooDeeOpsMut<T> for TooDeeViewMut<'a, T>[src]

impl<T> TooDeeOpsMut<T> for TooDee<T>[src]

Loading content...