Trait ArrowPrimitiveVariant

Source
pub(super) trait ArrowPrimitiveVariant: ArrowPrimitiveType {
    // Required method
    fn from_variant(variant: &Variant<'_, '_>) -> Option<Self::Native>;
}
Expand description

Trait for Arrow primitive types that can be used in the output builder

This just exists to add a generic way to convert from Variant to the primitive type

Required Methods§

Source

fn from_variant(variant: &Variant<'_, '_>) -> Option<Self::Native>

Try to extract the primitive value from a Variant, returning None if it cannot be converted

TODO: figure out how to handle coercion/casting

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl ArrowPrimitiveVariant for Int32Type

Source§

fn from_variant(variant: &Variant<'_, '_>) -> Option<Self::Native>

Implementors§