Struct memtable_core::prelude::FixedRowTable [−][src]
alloc
or std
only.Expand description
Represents an inmemory table containing rows & columns of some data T
with a fixed capacity across rows, but ability to grow dynamically with
columns
Implementations
Removes all cells contained within the table that are outside the current column capacity
pub fn iter(&self) -> ZipPosition<&T, Cells<'_, T, FixedRowTable<T, ROW>>>ⓘNotable traits for ZipPosition<T, I>
impl<T, I: CellIter<T>> Iterator for ZipPosition<T, I> type Item = (Position, T);
pub fn iter(&self) -> ZipPosition<&T, Cells<'_, T, FixedRowTable<T, ROW>>>ⓘNotable traits for ZipPosition<T, I>
impl<T, I: CellIter<T>> Iterator for ZipPosition<T, I> type Item = (Position, T);
Returns an iterator over the cells and their positions within the table
Trait Implementations
impl<'de, T: Default, const ROW: usize> Deserialize<'de> for FixedRowTable<T, ROW> where
T: Deserialize<'de>,
impl<'de, T: Default, const ROW: usize> Deserialize<'de> for FixedRowTable<T, ROW> where
T: Deserialize<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl<T: Default, V: Into<T>, const ROW: usize> FromIterator<(Position, V)> for FixedRowTable<T, ROW>
impl<T: Default, V: Into<T>, const ROW: usize> FromIterator<(Position, V)> for FixedRowTable<T, ROW>
impl<T: Default, V: Into<T>, const ROW: usize> FromIterator<(usize, usize, V)> for FixedRowTable<T, ROW>
impl<T: Default, V: Into<T>, const ROW: usize> FromIterator<(usize, usize, V)> for FixedRowTable<T, ROW>
Converts into an iterator over the table’s cells’ positions and values
type IntoIter = ZipPosition<&'a T, Cells<'a, T, FixedRowTable<T, ROW>>>
type IntoIter = ZipPosition<&'a T, Cells<'a, T, FixedRowTable<T, ROW>>>
Which kind of iterator are we turning this into?
impl<T: PartialEq + Default, const ROW: usize> PartialEq<FixedRowTable<T, ROW>> for FixedRowTable<T, ROW>
impl<T: PartialEq + Default, const ROW: usize> PartialEq<FixedRowTable<T, ROW>> for FixedRowTable<T, ROW>
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Will adjust the internal row count tracker to the specified capacity, capping at ROW.
Note that this does not remove any cells from the table in their
old positions. Instead, this updates the virtual space within the
table that is made available for methods like Table::cell
.
If you want to remove the cells that are no longer within capacity,
call Self::truncate
, which will reset them to their default value.
Will adjust the internal column count tracker to the specified capacity
Note that this does not remove any cells from the table in their
old positions. Instead, this updates the virtual space within the
table that is made available for methods like Table::cell
.
If you want to remove the cells that are no longer within capacity,
call Self::truncate
, which will reset them to their default value.
type Data = T
type Data = T
The type of data stored in individual cells within the table
type Row = DynamicList<Self::Data>
type Row = DynamicList<Self::Data>
The type of structure to hold a row of data
Returns the maximum row capacity of the table
Returns the maximum column capacity of the table
Returns reference to the cell found at the specified row and column Read more
Returns mut reference to the cell found at the specified row and column Read more
Replaces the given value into the cell of the table at the specified row and column, returning the previous value contained in the cell Read more
Removes the given value from the cell at the specified position, but does not shift any other cell to fill in the gap Read more
Returns the total cells (rows * columns) contained in the table Read more
Returns true if the total cells (rows * columns) contained in the table is zero Read more
Returns an iterator of refs through all rows in the table Read more
Returns an iterator of refs through a specific row in the table Read more
Consumes the table and returns an iterator through a specific row in the table Read more
Returns an iterator of refs through all columns in the table Read more
Returns an iterator of refs through a specific column in the table Read more
fn into_column(self, idx: usize) -> IntoColumn<Self::Data, Self>ⓘNotable traits for IntoColumn<D, T>
impl<D, T: Table<Data = D>> Iterator for IntoColumn<D, T> type Item = D;
fn into_column(self, idx: usize) -> IntoColumn<Self::Data, Self>ⓘNotable traits for IntoColumn<D, T>
impl<D, T: Table<Data = D>> Iterator for IntoColumn<D, T> type Item = D;
Consumes the table and returns an iterator through a specific column in the table Read more
Returns an iterator of refs through all cells in the table, starting from the first row, iterating through all cells from beginning to end, and then moving on to the next row Read more
Consumes the table and returns an iterator through all cells in the table, starting from the first row, iterating through all cells from beginning to end, and then moving on to the next row Read more
Returns whether or not a cell exists at the specified row & column. Note that this is not the same as whether or not the table’s current row & column range would include a cell at that position! Rather, this is reporting if a cell actually exists Read more
Inserts a new row into the table at the given position, shifting down all rows after it Read more
Pushes a row to the end of the table Read more
Removes the row at the specified position, shifting up all rows after it Read more
Inserts a new column into the table at the given position, shifting right all columns after it Read more
Pushes a column to the end of the table Read more
Removes the column at the specified position, shifting left all columns after it Read more
Pops a column off the end of the table Read more
Auto Trait Implementations
impl<T, const ROW: usize> RefUnwindSafe for FixedRowTable<T, ROW> where
T: RefUnwindSafe,
impl<T, const ROW: usize> Send for FixedRowTable<T, ROW> where
T: Send,
impl<T, const ROW: usize> Sync for FixedRowTable<T, ROW> where
T: Sync,
impl<T, const ROW: usize> Unpin for FixedRowTable<T, ROW> where
T: Unpin,
impl<T, const ROW: usize> UnwindSafe for FixedRowTable<T, ROW> where
T: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
csv
and std
only.Loads a table from a CSV str
csv
and std
only.Write a table to a string