pub enum ColumnData {
Integer {
validity: Bitmask,
values: SharedVec<i64>,
},
Float {
validity: Bitmask,
values: SharedVec<f64>,
},
Any(SharedVec<ResultData>),
}Expand description
A column of computed values, stored in whichever representation fits what it currently holds.
A column starts out as Integer and widens as needed: writing a float
promotes it to Float, and writing anything that is neither demotes it to
Any. It never narrows back. The two numeric representations keep a
separate validity Bitmask so a blank cell is distinct from a zero.
This is a storage detail of DataColumn, exposed for reading. The
operations that change a column’s length are crate-private, since they
would desync it from the sibling vectors it must stay aligned with – go
through Sheet to edit cells.
Variants§
Integer
All-integer, or integer-and-blank.
Fields
Float
Numeric with at least one non-integer, or integer-and-blank promoted.
Fields
Any(SharedVec<ResultData>)
Mixed: anything the numeric representations cannot hold – text, booleans, errors.
Implementations§
Source§impl ColumnData
impl ColumnData
Sourcepub fn get(&self, index: usize) -> Option<ResultData>
pub fn get(&self, index: usize) -> Option<ResultData>
The value at index, or None if that is past the end.
A blank within the column’s range reads as
Some(ResultData::None), which is what distinguishes it from an
out-of-range index.
Trait Implementations§
Source§impl Clone for ColumnData
impl Clone for ColumnData
Source§fn clone(&self) -> ColumnData
fn clone(&self) -> ColumnData
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more