Skip to main content

SetVirtualDataColumn

Trait SetVirtualDataColumn 

Source
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§

Source

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.

Source

fn new_builder() -> ColumnBuilder

Creates a new empty column builder of the appropriate type for this value.

Source

fn to_scalar(self) -> Scalar

Converts this value to a Scalar representation.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl SetVirtualDataColumn for Option<bool>

Source§

fn write_to(self, col: &mut ColumnBuilder) -> Result<(), &'static str>

Source§

fn new_builder() -> ColumnBuilder

Source§

fn to_scalar(self) -> Scalar

Source§

impl SetVirtualDataColumn for Option<f64>

Source§

fn write_to(self, col: &mut ColumnBuilder) -> Result<(), &'static str>

Source§

fn new_builder() -> ColumnBuilder

Source§

fn to_scalar(self) -> Scalar

Source§

impl SetVirtualDataColumn for Option<i32>

Source§

fn write_to(self, col: &mut ColumnBuilder) -> Result<(), &'static str>

Source§

fn new_builder() -> ColumnBuilder

Source§

fn to_scalar(self) -> Scalar

Source§

impl SetVirtualDataColumn for Option<i64>

Source§

fn write_to(self, col: &mut ColumnBuilder) -> Result<(), &'static str>

Source§

fn new_builder() -> ColumnBuilder

Source§

fn to_scalar(self) -> Scalar

Source§

impl SetVirtualDataColumn for Option<String>

Source§

fn write_to(self, col: &mut ColumnBuilder) -> Result<(), &'static str>

Source§

fn new_builder() -> ColumnBuilder

Source§

fn to_scalar(self) -> Scalar

Implementors§