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
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
Implement 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>
Implement Scalar for Box<str>.
Box<str> could be converted to &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]>
Implement Scalar for Bytes.
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
Implement Scalar for ListValue.
impl Scalar for ListValue
Implement Scalar for ListValue.
type ScalarRefType<'a> = ListRef<'a>
Source§impl Scalar for StructValue
Implement Scalar for StructValue.
impl Scalar for StructValue
Implement Scalar for StructValue.
type ScalarRefType<'a> = StructRef<'a>
Source§impl Scalar for Interval
Implement Scalar for Interval.
impl Scalar for Interval
Implement Scalar for Interval.
type ScalarRefType<'a> = Interval
Source§impl Scalar for Timestamp
Implement Scalar for Timestamp.
impl Scalar for Timestamp
Implement Scalar for Timestamp.
type ScalarRefType<'a> = Timestamp
Source§impl Scalar for Timestamptz
Implement Scalar for Timestamptz.
impl Scalar for Timestamptz
Implement Scalar for Timestamptz.