Skip to main content

LiquidPrimitiveType

Trait LiquidPrimitiveType 

Source
pub trait LiquidPrimitiveType:
    ArrowPrimitiveType<Native: AsPrimitive<<Self::UnSignedType as ArrowPrimitiveType>::Native> + AsPrimitive<i64> + FromPrimitive + Display>
    + Debug
    + Send
    + Sync
    + Sealed
    + PrimitiveKind
    + PhysicalTypeMarker {
    type UnSignedType: ArrowPrimitiveType<Native: AsPrimitive<Self::Native> + AsPrimitive<u64> + BitPacking> + Debug;
}
Expand description

LiquidPrimitiveType is a sealed trait that represents the primitive types supported by Liquid. Implemented for all supported integer, date, and timestamp Arrow primitive types.

I have to admit this trait is super complicated. Luckily users never have to worry about it, they can just use the types that are already implemented. We could have implemented this as a macro, but macro is ugly. Type is spec, code is proof.

Required Associated Types§

Source

type UnSignedType: ArrowPrimitiveType<Native: AsPrimitive<Self::Native> + AsPrimitive<u64> + BitPacking> + Debug

The unsigned type that can be used to represent the signed 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 LiquidPrimitiveType for Date32Type

Source§

impl LiquidPrimitiveType for Date64Type

Source§

impl LiquidPrimitiveType for Int8Type

Source§

impl LiquidPrimitiveType for Int16Type

Source§

impl LiquidPrimitiveType for Int32Type

Source§

impl LiquidPrimitiveType for Int64Type

Source§

impl LiquidPrimitiveType for TimestampMicrosecondType

Source§

impl LiquidPrimitiveType for TimestampMillisecondType

Source§

impl LiquidPrimitiveType for TimestampNanosecondType

Source§

impl LiquidPrimitiveType for TimestampSecondType

Source§

impl LiquidPrimitiveType for UInt8Type

Source§

impl LiquidPrimitiveType for UInt16Type

Source§

impl LiquidPrimitiveType for UInt32Type

Source§

impl LiquidPrimitiveType for UInt64Type

Implementors§