datatypes::types::primitive_type

Trait WrapperType

Source
pub trait WrapperType:
    Copy
    + Send
    + Sync
    + Debug
    + for<'a> Scalar<RefType<'a> = Self>
    + PartialEq
    + Into<Value>
    + Into<ValueRef<'static>>
    + Serialize
    + Into<Value> {
    type LogicalType: LogicalPrimitiveType<Wrapper = Self, Native = Self::Native>;
    type Native: ArrowNativeType;

    // Required methods
    fn from_native(value: Self::Native) -> Self;
    fn into_native(self) -> Self::Native;
}
Expand description

Represents the wrapper type that wraps a native type using the newtype pattern, such as Date is a wrapper type for the underlying native type i32.

Required Associated Types§

Source

type LogicalType: LogicalPrimitiveType<Wrapper = Self, Native = Self::Native>

Logical primitive type that this wrapper type belongs to.

Source

type Native: ArrowNativeType

The underlying native type.

Required Methods§

Source

fn from_native(value: Self::Native) -> Self

Convert native type into this wrapper type.

Source

fn into_native(self) -> Self::Native

Convert this wrapper type into native type.

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 WrapperType for f32

Source§

impl WrapperType for f64

Source§

impl WrapperType for i8

Source§

impl WrapperType for i16

Source§

impl WrapperType for i32

Source§

impl WrapperType for i64

Source§

impl WrapperType for u8

Source§

impl WrapperType for u16

Source§

impl WrapperType for u32

Source§

impl WrapperType for u64

Source§

impl WrapperType for Date

Source§

impl WrapperType for DateTime

Source§

impl WrapperType for IntervalDayTime

Source§

type LogicalType = IntervalDayTimeType

Source§

type Native = IntervalDayTime

Source§

fn from_native(value: Self::Native) -> Self

Source§

fn into_native(self) -> Self::Native

Source§

impl WrapperType for IntervalMonthDayNano

Source§

type LogicalType = IntervalMonthDayNanoType

Source§

type Native = IntervalMonthDayNano

Source§

fn from_native(value: Self::Native) -> Self

Source§

fn into_native(self) -> Self::Native

Source§

impl WrapperType for IntervalYearMonth

Implementors§