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§
sourcetype ScalarRefType<'a>: ScalarRef<'a, ScalarType = Self> + 'a
where
Self: 'a
type ScalarRefType<'a>: ScalarRef<'a, ScalarType = Self> + 'a where Self: 'a
Type for reference of Scalar
Required Methods§
sourcefn as_scalar_ref(&self) -> Self::ScalarRefType<'_>
fn as_scalar_ref(&self) -> Self::ScalarRefType<'_>
Get a reference to current scalar.
Provided Methods§
fn to_scalar_value(self) -> ScalarImpl
Object Safety§
This trait is not object safe.
Implementations on Foreign Types§
source§impl Scalar for bool
impl Scalar for bool
Implement Scalar
for bool
.
type ScalarRefType<'a> = bool
fn as_scalar_ref(&self) -> bool
source§impl Scalar for Box<str>
impl Scalar for Box<str>
Implement Scalar
for Box<str>
.
Box<str>
could be converted to &str
.
type ScalarRefType<'a> = &'a str
fn as_scalar_ref(&self) -> &str
source§impl Scalar for Box<[u8]>
impl Scalar for Box<[u8]>
Implement Scalar
for Bytes
.
type ScalarRefType<'a> = &'a [u8]
fn as_scalar_ref(&self) -> &[u8] ⓘ
Implementors§
source§impl Scalar for ListValue
impl Scalar for ListValue
Implement Scalar
for ListValue
.
type ScalarRefType<'a> = ListRef<'a>
source§impl Scalar for StructValue
impl Scalar for StructValue
Implement Scalar
for StructValue
.
type ScalarRefType<'a> = StructRef<'a>
source§impl Scalar for Timestamp
impl Scalar for Timestamp
Implement Scalar
for Timestamp
.
type ScalarRefType<'a> = Timestamp
source§impl Scalar for Interval
impl Scalar for Interval
Implement Scalar
for Interval
.
type ScalarRefType<'a> = Interval
source§impl Scalar for Timestamptz
impl Scalar for Timestamptz
Implement Scalar
for Timestamptz
.