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§
sourcetype ScalarType: Scalar<ScalarRefType<'a> = Self>
type ScalarType: Scalar<ScalarRefType<'a> = Self>
ScalarType
is the owned type of current ScalarRef
.
Required Methods§
sourcefn to_owned_scalar(&self) -> Self::ScalarType
fn to_owned_scalar(&self) -> Self::ScalarType
Convert ScalarRef
to an owned scalar.
sourcefn hash_scalar<H: Hasher>(&self, state: &mut H)
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
impl ScalarRef<'_> for bool
Implement ScalarRef
for bool
.
type ScalarType = bool
fn to_owned_scalar(&self) -> bool
fn hash_scalar<H: Hasher>(&self, state: &mut H)
source§impl<'a> ScalarRef<'a> for &'a str
impl<'a> ScalarRef<'a> for &'a str
Implement ScalarRef
for Box<str>
.
Box<str>
could be converted to &str
.
type ScalarType = Box<str>
fn to_owned_scalar(&self) -> Box<str>
fn hash_scalar<H: Hasher>(&self, state: &mut H)
source§impl<'a> ScalarRef<'a> for &'a [u8]
impl<'a> ScalarRef<'a> for &'a [u8]
type ScalarType = Box<[u8]>
fn to_owned_scalar(&self) -> Box<[u8]>
fn hash_scalar<H: Hasher>(&self, state: &mut H)
source§impl<'scalar> ScalarRef<'scalar> for i16
impl<'scalar> ScalarRef<'scalar> for i16
type ScalarType = i16
fn to_owned_scalar(&self) -> Self
fn hash_scalar<H: Hasher>(&self, state: &mut H)
source§impl<'scalar> ScalarRef<'scalar> for i32
impl<'scalar> ScalarRef<'scalar> for i32
type ScalarType = i32
fn to_owned_scalar(&self) -> Self
fn hash_scalar<H: Hasher>(&self, state: &mut H)
source§impl<'scalar> ScalarRef<'scalar> for i64
impl<'scalar> ScalarRef<'scalar> for i64
type ScalarType = i64
fn to_owned_scalar(&self) -> Self
fn hash_scalar<H: Hasher>(&self, state: &mut H)
Implementors§
source§impl ScalarRef<'_> for Decimal
impl ScalarRef<'_> for Decimal
Implement ScalarRef
for Decimal
.
type ScalarType = Decimal
source§impl ScalarRef<'_> for Timestamp
impl ScalarRef<'_> for Timestamp
Implement ScalarRef
for Timestamp
.
type ScalarType = Timestamp
source§impl ScalarRef<'_> for Interval
impl ScalarRef<'_> for Interval
Implement ScalarRef
for Interval
.
type ScalarType = Interval
source§impl ScalarRef<'_> for Timestamptz
impl ScalarRef<'_> for Timestamptz
Implement ScalarRef
for Timestamptz
.
type ScalarType = Timestamptz
source§impl<'a> ScalarRef<'a> for StructRef<'a>
impl<'a> ScalarRef<'a> for StructRef<'a>
Implement Scalar
for StructValue
.
type ScalarType = StructValue
source§impl<'a> ScalarRef<'a> for ListRef<'a>
impl<'a> ScalarRef<'a> for ListRef<'a>
Implement Scalar
for ListValue
.