datatypes::scalars

Trait Scalar

Source
pub trait Scalar:
    'static
    + Sized
    + Default
    + Any
where for<'a> Self::VectorType: ScalarVector<RefItem<'a> = Self::RefType<'a>>,
{ type VectorType: ScalarVector<OwnedItem = Self>; type RefType<'a>: ScalarRef<'a, ScalarType = Self> where Self: 'a; // Required methods fn as_scalar_ref(&self) -> Self::RefType<'_>; fn upcast_gat<'short, 'long: 'short>( long: Self::RefType<'long>, ) -> Self::RefType<'short>; }
Expand description

Owned scalar value e.g. primitive types, bool, Vec<u8>

Required Associated Types§

Source

type VectorType: ScalarVector<OwnedItem = Self>

Source

type RefType<'a>: ScalarRef<'a, ScalarType = Self> where Self: 'a

Required Methods§

Source

fn as_scalar_ref(&self) -> Self::RefType<'_>

Get a reference of the current value.

Source

fn upcast_gat<'short, 'long: 'short>( long: Self::RefType<'long>, ) -> Self::RefType<'short>

Upcast GAT type’s lifetime.

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 Scalar for bool

Source§

type VectorType = BooleanVector

Source§

type RefType<'a> = bool

Source§

fn as_scalar_ref(&self) -> bool

Source§

fn upcast_gat<'short, 'long: 'short>(long: bool) -> bool

Source§

impl Scalar for f32

Source§

type VectorType = PrimitiveVector<Float32Type>

Source§

type RefType<'a> = f32

Source§

fn as_scalar_ref(&self) -> f32

Source§

fn upcast_gat<'short, 'long: 'short>(long: f32) -> f32

Source§

impl Scalar for f64

Source§

type VectorType = PrimitiveVector<Float64Type>

Source§

type RefType<'a> = f64

Source§

fn as_scalar_ref(&self) -> f64

Source§

fn upcast_gat<'short, 'long: 'short>(long: f64) -> f64

Source§

impl Scalar for i8

Source§

type VectorType = PrimitiveVector<Int8Type>

Source§

type RefType<'a> = i8

Source§

fn as_scalar_ref(&self) -> i8

Source§

fn upcast_gat<'short, 'long: 'short>(long: i8) -> i8

Source§

impl Scalar for i16

Source§

type VectorType = PrimitiveVector<Int16Type>

Source§

type RefType<'a> = i16

Source§

fn as_scalar_ref(&self) -> i16

Source§

fn upcast_gat<'short, 'long: 'short>(long: i16) -> i16

Source§

impl Scalar for i32

Source§

type VectorType = PrimitiveVector<Int32Type>

Source§

type RefType<'a> = i32

Source§

fn as_scalar_ref(&self) -> i32

Source§

fn upcast_gat<'short, 'long: 'short>(long: i32) -> i32

Source§

impl Scalar for i64

Source§

type VectorType = PrimitiveVector<Int64Type>

Source§

type RefType<'a> = i64

Source§

fn as_scalar_ref(&self) -> i64

Source§

fn upcast_gat<'short, 'long: 'short>(long: i64) -> i64

Source§

impl Scalar for u8

Source§

type VectorType = PrimitiveVector<UInt8Type>

Source§

type RefType<'a> = u8

Source§

fn as_scalar_ref(&self) -> u8

Source§

fn upcast_gat<'short, 'long: 'short>(long: u8) -> u8

Source§

impl Scalar for u16

Source§

type VectorType = PrimitiveVector<UInt16Type>

Source§

type RefType<'a> = u16

Source§

fn as_scalar_ref(&self) -> u16

Source§

fn upcast_gat<'short, 'long: 'short>(long: u16) -> u16

Source§

impl Scalar for u32

Source§

type VectorType = PrimitiveVector<UInt32Type>

Source§

type RefType<'a> = u32

Source§

fn as_scalar_ref(&self) -> u32

Source§

fn upcast_gat<'short, 'long: 'short>(long: u32) -> u32

Source§

impl Scalar for u64

Source§

type VectorType = PrimitiveVector<UInt64Type>

Source§

type RefType<'a> = u64

Source§

fn as_scalar_ref(&self) -> u64

Source§

fn upcast_gat<'short, 'long: 'short>(long: u64) -> u64

Source§

impl Scalar for String

Source§

type VectorType = StringVector

Source§

type RefType<'a> = &'a str

Source§

fn as_scalar_ref(&self) -> &str

Source§

fn upcast_gat<'short, 'long: 'short>(long: &'long str) -> &'short str

Source§

impl Scalar for Vec<u8>

Source§

type VectorType = BinaryVector

Source§

type RefType<'a> = &'a [u8]

Source§

fn as_scalar_ref(&self) -> &[u8]

Source§

fn upcast_gat<'short, 'long: 'short>(long: &'long [u8]) -> &'short [u8]

Source§

impl Scalar for Date

Source§

type VectorType = PrimitiveVector<DateType>

Source§

type RefType<'a> = Date

Source§

fn as_scalar_ref(&self) -> Self::RefType<'_>

Source§

fn upcast_gat<'short, 'long: 'short>( long: Self::RefType<'long>, ) -> Self::RefType<'short>

Source§

impl Scalar for DateTime

Source§

type VectorType = PrimitiveVector<DateTimeType>

Source§

type RefType<'a> = DateTime

Source§

fn as_scalar_ref(&self) -> Self::RefType<'_>

Source§

fn upcast_gat<'short, 'long: 'short>( long: Self::RefType<'long>, ) -> Self::RefType<'short>

Source§

impl Scalar for Decimal128

Source§

type VectorType = Decimal128Vector

Source§

type RefType<'a> = Decimal128

Source§

fn as_scalar_ref(&self) -> Self::RefType<'_>

Source§

fn upcast_gat<'short, 'long: 'short>( long: Self::RefType<'long>, ) -> Self::RefType<'short>

Source§

impl Scalar for IntervalDayTime

Source§

type VectorType = PrimitiveVector<IntervalDayTimeType>

Source§

type RefType<'a> = IntervalDayTime

Source§

fn as_scalar_ref(&self) -> Self::RefType<'_>

Source§

fn upcast_gat<'short, 'long: 'short>( long: Self::RefType<'long>, ) -> Self::RefType<'short>

Source§

impl Scalar for IntervalMonthDayNano

Source§

type VectorType = PrimitiveVector<IntervalMonthDayNanoType>

Source§

type RefType<'a> = IntervalMonthDayNano

Source§

fn as_scalar_ref(&self) -> Self::RefType<'_>

Source§

fn upcast_gat<'short, 'long: 'short>( long: Self::RefType<'long>, ) -> Self::RefType<'short>

Source§

impl Scalar for IntervalYearMonth

Source§

type VectorType = PrimitiveVector<IntervalYearMonthType>

Source§

type RefType<'a> = IntervalYearMonth

Source§

fn as_scalar_ref(&self) -> Self::RefType<'_>

Source§

fn upcast_gat<'short, 'long: 'short>( long: Self::RefType<'long>, ) -> Self::RefType<'short>

Implementors§

Source§

impl Scalar for DurationMicrosecond

Source§

impl Scalar for DurationMillisecond

Source§

impl Scalar for DurationNanosecond

Source§

impl Scalar for DurationSecond

Source§

impl Scalar for TimeMicrosecond

Source§

impl Scalar for TimeMillisecond

Source§

impl Scalar for TimeNanosecond

Source§

impl Scalar for TimeSecond

Source§

impl Scalar for TimestampMicrosecond

Source§

impl Scalar for TimestampMillisecond

Source§

impl Scalar for TimestampNanosecond

Source§

impl Scalar for TimestampSecond

Source§

impl Scalar for ListValue