pub trait Scalar:
'static
+ Sized
+ Default
+ Any{
type VectorType: ScalarVector<OwnedItem = Self>;
type RefType<'a>: ScalarRef<'a, ScalarType = Self>
where Self: 'a;
// Required methods
fn as_scalar_ref(&self) -> Self::RefType<'_>;
fn upcast_gat<'short, 'long: 'short>(
long: Self::RefType<'long>,
) -> Self::RefType<'short>;
}
Expand description
Owned scalar value
e.g. primitive types, bool, Vec<u8>
…
Required Associated Types§
type VectorType: ScalarVector<OwnedItem = Self>
type RefType<'a>: ScalarRef<'a, ScalarType = Self> where Self: 'a
Required Methods§
Sourcefn as_scalar_ref(&self) -> Self::RefType<'_>
fn as_scalar_ref(&self) -> Self::RefType<'_>
Get a reference of the current value.
Sourcefn upcast_gat<'short, 'long: 'short>(
long: Self::RefType<'long>,
) -> Self::RefType<'short>
fn upcast_gat<'short, 'long: 'short>( long: Self::RefType<'long>, ) -> Self::RefType<'short>
Upcast GAT type’s lifetime.
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.