pub trait SetVirtualDataColumn {
// Required methods
fn write_to(self, col: &mut ColumnBuilder) -> Result<(), &'static str>;
fn new_builder() -> ColumnBuilder;
fn to_scalar(self) -> Scalar;
}Expand description
Trait for types that can be written to a [ColumnBuilder] which
enforces sequential construction.
This trait enables type-safe insertion of values into virtual data columns, ensuring that values are written to columns of the correct type.
Required Methods§
Sourcefn write_to(self, col: &mut ColumnBuilder) -> Result<(), &'static str>
fn write_to(self, col: &mut ColumnBuilder) -> Result<(), &'static str>
Writes this value (sequentially) to the given column builder.
Returns an error if the column type does not match the value type.
Sourcefn new_builder() -> ColumnBuilder
fn new_builder() -> ColumnBuilder
Creates a new empty column builder of the appropriate type for this value.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".