pub trait Resizable {
    // Required methods
    fn swap(&mut self, lhs: Position, rhs: Position);
    fn swap_row(&mut self, lhs: usize, rhs: usize);
    fn swap_column(&mut self, lhs: usize, rhs: usize);
    fn push_row(&mut self);
    fn push_column(&mut self);
    fn remove_row(&mut self, row: usize);
    fn remove_column(&mut self, column: usize);
    fn insert_row(&mut self, row: usize);
    fn insert_column(&mut self, column: usize);
}
Expand description

A records representation which can be modified by moving rows/columns around.

Required Methods§

source

fn swap(&mut self, lhs: Position, rhs: Position)

Swap cells with one another.

source

fn swap_row(&mut self, lhs: usize, rhs: usize)

Swap rows with one another.

source

fn swap_column(&mut self, lhs: usize, rhs: usize)

Swap columns with one another.

source

fn push_row(&mut self)

Adds a new row to a data set.

source

fn push_column(&mut self)

Adds a new column to a data set.

source

fn remove_row(&mut self, row: usize)

Removes a row from a data set by index.

source

fn remove_column(&mut self, column: usize)

Removes a column from a data set by index.

source

fn insert_row(&mut self, row: usize)

Inserts a row at index.

source

fn insert_column(&mut self, column: usize)

Inserts column at index.

Implementations on Foreign Types§

source§

impl<T> Resizable for &mut T
where T: Resizable,

source§

fn swap(&mut self, lhs: Position, rhs: Position)

source§

fn swap_row(&mut self, lhs: usize, rhs: usize)

source§

fn swap_column(&mut self, lhs: usize, rhs: usize)

source§

fn push_row(&mut self)

source§

fn push_column(&mut self)

source§

fn remove_row(&mut self, row: usize)

source§

fn remove_column(&mut self, column: usize)

source§

fn insert_row(&mut self, row: usize)

source§

fn insert_column(&mut self, column: usize)

source§

impl<T> Resizable for Vec<Vec<T>>
where T: Default + Clone,

Available on crate feature std only.
source§

fn swap(&mut self, lhs: Position, rhs: Position)

source§

fn swap_row(&mut self, lhs: usize, rhs: usize)

source§

fn swap_column(&mut self, lhs: usize, rhs: usize)

source§

fn push_row(&mut self)

source§

fn push_column(&mut self)

source§

fn remove_row(&mut self, row: usize)

source§

fn remove_column(&mut self, column: usize)

source§

fn insert_row(&mut self, row: usize)

source§

fn insert_column(&mut self, column: usize)

Implementors§

source§

impl<T> Resizable for VecRecords<T>
where T: Default + Clone,

Available on crate feature std only.