pub struct Table<C: TableKV, R: TableKV, V: TableKV> {
pub tuples: HashMap<(usize, usize), HashSet<usize>>,
pub cols2values: HashMap<usize, HashSet<usize>>,
pub rows2values: HashMap<usize, HashSet<usize>>,
pub values: HashMap<usize, V>,
pub cols: HashMap<usize, C>,
pub rows: HashMap<usize, R>,
}
Fields§
§tuples: HashMap<(usize, usize), HashSet<usize>>
§cols2values: HashMap<usize, HashSet<usize>>
§rows2values: HashMap<usize, HashSet<usize>>
§values: HashMap<usize, V>
§cols: HashMap<usize, C>
§rows: HashMap<usize, R>
Implementations§
Source§impl<C: TableKV, R: TableKV, V: TableKV> Table<C, R, V>
impl<C: TableKV, R: TableKV, V: TableKV> Table<C, R, V>
pub fn new() -> Self
pub fn insert(&mut self, column: C, row: R, value: V)
pub fn insert_column_value(&mut self, column: C, row_key: usize, value: V)
pub fn insert_row_value(&mut self, column_key: usize, row: R, value: V)
pub fn insert_value(&mut self, column_key: usize, row_key: usize, value: V)
pub fn remove(&mut self, column_key: usize, row_key: usize, value_key: usize)
pub fn remove_by_row(&mut self, row_key_to_remove: usize)
pub fn remove_by_column(&mut self, column_key_to_remove: usize)
pub fn is_empty(&self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl<C, R, V> Freeze for Table<C, R, V>
impl<C, R, V> RefUnwindSafe for Table<C, R, V>
impl<C, R, V> Send for Table<C, R, V>
impl<C, R, V> Sync for Table<C, R, V>
impl<C, R, V> Unpin for Table<C, R, V>
impl<C, R, V> UnwindSafe for Table<C, R, V>
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