Struct memtable::FixedTable[][src]

pub struct FixedTable<T, const ROW: usize, const COL: usize> where
    T: Default
{ /* fields omitted */ }
Expand description

Represents an inmemory table containing rows & columns of some data T with a fixed capacity across both rows and columns

Implementations

Creates a new, empty table

Removes all cells contained within the table that are outside the current row & column capacity

Returns an iterator over the cells and their positions within the table

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Creates a new table with maximum allocation of ROWxCOL, but with a virtual space (current occupancy) of 0x0

Deserialize this value from the given Serde deserializer. Read more

Creates a new table with the provided cells as a starting point. As there is no way to tell how much of the 2D array is being used, the assumption is that the full array is occupied.

If this is incorrect, adjust the virtual row and column counts with [Table::set_row_capacity] and [Table::set_column_capacity] respectively.

Produces a table from the provided iterator of (position, value). All values that would go outside of the range of the table will be dropped.

Produces a table from the provided iterator of (row, col, value). All values that would go outside of the range of the table will be dropped.

Indexes into a table by a specific row and column, returning a reference to the cell if it exists, otherwise panicking

The returned type after indexing.

Indexes into a table by a specific row and column, returning a mutable reference to the cell if it exists, otherwise panicking

Converts into an iterator over the table’s cells’ positions and values

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

Converts into an iterator over the table’s cells’ positions and values

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Serialize this value into the given Serde serializer. Read more

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, capping at COL.

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.

The type of data stored in individual cells within the table

The type of structure to hold a row of data

The type of structure to hold a column of data

Returns the maximum row capacity of the table

Returns the maximum column capacity of the table

Returns the total rows contained in the table Read more

Returns the total columns contained in the table Read more

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

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

Pops a row off the end of the table 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

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Represents the type to produce from CSV data

Loads a table from some instance of the io::Read trait

Loads a table from a CSV str

Loads a table from a CSV file found at the given path

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

Writes a table to some instance of the io::Write trait

Write a table to a string

Writes a table to a CSV file at the given path

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.