papergrid::records

Trait Resizable

Source
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);
}
Expand description

A Grid representation of a data set 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 to specific by row index.

Implementors§

Source§

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