risingwave_common::types

Trait Scalar

source
pub trait Scalar: ScalarBounds<ScalarImpl> + 'static {
    type ScalarRefType<'a>: ScalarRef<'a, ScalarType = Self> + 'a
       where Self: 'a;

    // Required method
    fn as_scalar_ref(&self) -> Self::ScalarRefType<'_>;

    // Provided method
    fn to_scalar_value(self) -> ScalarImpl { ... }
}
Expand description

Scalar is a trait over all possible owned types in the evaluation framework.

Scalar is reciprocal to ScalarRef. Use as_scalar_ref to get a reference which has the same lifetime as self.

Required Associated Types§

source

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

Type for reference of Scalar

Required Methods§

source

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

Get a reference to current scalar.

Provided Methods§

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Scalar for bool

Implement Scalar for bool.

source§

impl Scalar for i16

source§

type ScalarRefType<'a> = i16

source§

fn as_scalar_ref(&self) -> Self

source§

impl Scalar for i32

source§

type ScalarRefType<'a> = i32

source§

fn as_scalar_ref(&self) -> Self

source§

impl Scalar for i64

source§

type ScalarRefType<'a> = i64

source§

fn as_scalar_ref(&self) -> Self

source§

impl Scalar for Box<str>

Implement Scalar for Box<str>. Box<str> could be converted to &str.

source§

impl Scalar for Box<[u8]>

Implement Scalar for Bytes.

source§

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

source§

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

Implementors§

source§

impl Scalar for Decimal

Implement Scalar for Decimal.

source§

impl Scalar for ListValue

Implement Scalar for ListValue.

source§

impl Scalar for MapValue

source§

impl Scalar for StructValue

Implement Scalar for StructValue.

source§

impl Scalar for Date

Implement Scalar for Date.

source§

impl Scalar for Time

Implement Scalar for Time.

source§

impl Scalar for Timestamp

Implement Scalar for Timestamp.

source§

impl Scalar for Interval

Implement Scalar for Interval.

source§

impl Scalar for JsonbVal

source§

impl Scalar for Int256

source§

impl Scalar for Serial

source§

impl Scalar for Timestamptz

Implement Scalar for Timestamptz.

source§

impl Scalar for F32

source§

impl Scalar for F64