risingwave_common::types

Trait ScalarRef

source
pub trait ScalarRef<'a>:
    ScalarBounds<ScalarRefImpl<'a>>
    + 'a
    + Copy {
    type ScalarType: Scalar<ScalarRefType<'a> = Self>;

    // Required methods
    fn to_owned_scalar(&self) -> Self::ScalarType;
    fn hash_scalar<H: Hasher>(&self, state: &mut H);
}
Expand description

ScalarRef is a trait over all possible references in the evaluation framework.

ScalarRef is reciprocal to Scalar. Use to_owned_scalar to get an owned scalar.

Required Associated Types§

source

type ScalarType: Scalar<ScalarRefType<'a> = Self>

ScalarType is the owned type of current ScalarRef.

Required Methods§

source

fn to_owned_scalar(&self) -> Self::ScalarType

Convert ScalarRef to an owned scalar.

source

fn hash_scalar<H: Hasher>(&self, state: &mut H)

A wrapped hash function to get the hash value for this scaler.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl ScalarRef<'_> for bool

Implement ScalarRef for bool.

source§

impl<'a> ScalarRef<'a> for &'a str

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

source§

impl<'a> ScalarRef<'a> for &'a [u8]

source§

impl<'scalar> ScalarRef<'scalar> for i16

source§

type ScalarType = i16

source§

fn to_owned_scalar(&self) -> Self

source§

fn hash_scalar<H: Hasher>(&self, state: &mut H)

source§

impl<'scalar> ScalarRef<'scalar> for i32

source§

type ScalarType = i32

source§

fn to_owned_scalar(&self) -> Self

source§

fn hash_scalar<H: Hasher>(&self, state: &mut H)

source§

impl<'scalar> ScalarRef<'scalar> for i64

source§

type ScalarType = i64

source§

fn to_owned_scalar(&self) -> Self

source§

fn hash_scalar<H: Hasher>(&self, state: &mut H)

Implementors§

source§

impl ScalarRef<'_> for Decimal

Implement ScalarRef for Decimal.

source§

impl ScalarRef<'_> for Date

Implement ScalarRef for Date.

source§

impl ScalarRef<'_> for Time

Implement ScalarRef for Time.

source§

impl ScalarRef<'_> for Timestamp

Implement ScalarRef for Timestamp.

source§

impl ScalarRef<'_> for Interval

Implement ScalarRef for Interval.

source§

impl ScalarRef<'_> for Timestamptz

Implement ScalarRef for Timestamptz.

source§

impl<'a> ScalarRef<'a> for StructRef<'a>

Implement Scalar for StructValue.

source§

impl<'a> ScalarRef<'a> for ListRef<'a>

Implement Scalar for ListValue.

source§

impl<'a> ScalarRef<'a> for MapRef<'a>

source§

impl<'a> ScalarRef<'a> for JsonbRef<'a>

source§

impl<'a> ScalarRef<'a> for Int256Ref<'a>

source§

impl<'scalar> ScalarRef<'scalar> for Serial

source§

impl<'scalar> ScalarRef<'scalar> for F32

source§

impl<'scalar> ScalarRef<'scalar> for F64