pub trait DataView {
// Required methods
fn nrows(&self) -> usize;
fn f64_col(&self, col: &Col<f64>) -> Result<NumericCol<'_>, FormulaError>;
// Provided methods
fn bool_col(&self, col: &Col<bool>) -> Result<BoolCol<'_>, FormulaError> { ... }
fn cat_col(&self, col: &Col<Category>) -> Result<CatCol<'_>, FormulaError> { ... }
}Expand description
Read-only data access contract for the formula layer.
Required Methods§
Sourcefn f64_col(&self, col: &Col<f64>) -> Result<NumericCol<'_>, FormulaError>
fn f64_col(&self, col: &Col<f64>) -> Result<NumericCol<'_>, FormulaError>
Returns an f64 column by typed column reference.
Implementations should return FormulaError::UnknownColumn when the
name is not available. The formula layer validates row counts.
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".