pub struct Column {
pub name: String,
pub ty: ColType,
pub cells: Vec<Value>,
}Expand description
One named column with an inferred type and its cells in row order.
Fields§
§name: String§ty: ColType§cells: Vec<Value>Implementations§
Source§impl Column
impl Column
Sourcepub fn new(name: impl Into<String>, cells: Vec<Value>) -> Self
pub fn new(name: impl Into<String>, cells: Vec<Value>) -> Self
Builds a column from name and cells, inferring ty by folding each
cell’s contributed type through ColType::unify.
Sourcepub fn numeric(&self) -> Vec<f64>
pub fn numeric(&self) -> Vec<f64>
The finite numeric projection of this column (nulls and non-numeric cells dropped). Empty for non-numeric columns — honest absence, not zeros.
Sourcepub fn null_count(&self) -> usize
pub fn null_count(&self) -> usize
Count of null cells.
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Column
impl<'de> Deserialize<'de> for Column
Source§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
Auto Trait Implementations§
impl Freeze for Column
impl RefUnwindSafe for Column
impl Send for Column
impl Sync for Column
impl Unpin for Column
impl UnsafeUnpin for Column
impl UnwindSafe for Column
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