pub struct VirtualArray {
    pub columns: Vec<Column>,
    pub rows: Vec<Vec<Value>>,
}
Expand description

Virtual data which contains csv information in a form of arrays.

  • VirtualArray holds row information as vectors. Therefore indexing is generally faster than virtual data struct.
  • VirtualArray allows duplicate columns
  • VirtualArray doesn’t allow limiters.

Fields

columns: Vec<Column>rows: Vec<Vec<Value>>

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Returns the “default value” for a type. Read more

to_string implementation for virtual array

This returns csv value string

Formats the value using the given formatter. Read more

Rename a column

This will simply change the name of the column and doesn’t affect rows.

Set values to a column

Given value will override every row’s value

Edit a row

Only edit row’s cell when value is not none

Insert a row to given index

This can yield out of range error

Delete a row with given row_index

This doesn’t fail but silently do nothing if index is out of range

Insert a column with given column informations

  • column_index : Position to put column
  • column_name : New column name

Delete a column with given column index

Move a given column to target column index

Create empty virtual container

Get total rows count

Get total columns count

Drop all data from virtual data

get cell data by coordinate

Set cell value by coordinate

Move a given row to a target row index

Set values to a row Read more

Apply closure to all values

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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

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

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

Converts the given value to a String. 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.