pub enum ArrayValue {
Show 19 variants
Sum(Box<[SumValue]>),
Product(Box<[ProductValue]>),
Bool(Box<[bool]>),
I8(Box<[i8]>),
U8(Box<[u8]>),
I16(Box<[i16]>),
U16(Box<[u16]>),
I32(Box<[i32]>),
U32(Box<[u32]>),
I64(Box<[i64]>),
U64(Box<[u64]>),
I128(Box<[i128]>),
U128(Box<[u128]>),
I256(Box<[i256]>),
U256(Box<[u256]>),
F32(Box<[F32]>),
F64(Box<[F64]>),
String(Box<[Box<str>]>),
Array(Box<[ArrayValue]>),
}Expand description
An array value in “monomorphized form”.
Arrays are represented in this way monomorphized fashion for efficiency
rather than unnecessary indirections and tags of AlgebraicValue.
We can do this as we know statically that the type of each element is the same
as arrays are homogenous dynamically sized product types.
Variants§
Sum(Box<[SumValue]>)
An array of SumValues.
Product(Box<[ProductValue]>)
An array of ProductValues.
Bool(Box<[bool]>)
An array of bools.
I8(Box<[i8]>)
An array of i8s.
U8(Box<[u8]>)
An array of u8s.
I16(Box<[i16]>)
An array of i16s.
U16(Box<[u16]>)
An array of u16s.
I32(Box<[i32]>)
An array of i32s.
U32(Box<[u32]>)
An array of u32s.
I64(Box<[i64]>)
An array of i64s.
U64(Box<[u64]>)
An array of u64s.
I128(Box<[i128]>)
An array of i128s.
U128(Box<[u128]>)
An array of u128s.
I256(Box<[i256]>)
An array of i256s.
U256(Box<[u256]>)
An array of u256s.
F32(Box<[F32]>)
An array of totally ordered F32s.
F64(Box<[F64]>)
An array of totally ordered F64s.
String(Box<[Box<str>]>)
An array of UTF-8 strings.
Array(Box<[ArrayValue]>)
An array of arrays.
Implementations§
Source§impl ArrayValue
impl ArrayValue
Sourcepub fn iter_cloned(&self) -> ArrayValueIterCloned<'_> ⓘ
pub fn iter_cloned(&self) -> ArrayValueIterCloned<'_> ⓘ
Returns a cloning iterator on the elements of self as AlgebraicValues.
Trait Implementations§
Source§impl Clone for ArrayValue
impl Clone for ArrayValue
Source§fn clone(&self) -> ArrayValue
fn clone(&self) -> ArrayValue
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ArrayValue
impl Debug for ArrayValue
Source§impl Default for ArrayValue
impl Default for ArrayValue
Source§impl<const N: usize> From<[ArrayValue; N]> for ArrayValue
impl<const N: usize> From<[ArrayValue; N]> for ArrayValue
Source§fn from(v: [ArrayValue; N]) -> Self
fn from(v: [ArrayValue; N]) -> Self
Source§impl<const N: usize> From<[ConstrainedFloat<f32, UnitConstraint<f32>>; N]> for ArrayValue
impl<const N: usize> From<[ConstrainedFloat<f32, UnitConstraint<f32>>; N]> for ArrayValue
Source§impl<const N: usize> From<[ConstrainedFloat<f64, UnitConstraint<f64>>; N]> for ArrayValue
impl<const N: usize> From<[ConstrainedFloat<f64, UnitConstraint<f64>>; N]> for ArrayValue
Source§impl<const N: usize> From<[ProductValue; N]> for ArrayValue
impl<const N: usize> From<[ProductValue; N]> for ArrayValue
Source§fn from(v: [ProductValue; N]) -> Self
fn from(v: [ProductValue; N]) -> Self
Source§impl From<ArrayValue> for AlgebraicValue
impl From<ArrayValue> for AlgebraicValue
Source§fn from(original: ArrayValue) -> AlgebraicValue
fn from(original: ArrayValue) -> AlgebraicValue
Source§impl From<Box<[ArrayValue]>> for ArrayValue
impl From<Box<[ArrayValue]>> for ArrayValue
Source§fn from(v: Box<[ArrayValue]>) -> Self
fn from(v: Box<[ArrayValue]>) -> Self
Source§impl From<Box<[ConstrainedFloat<f32, UnitConstraint<f32>>]>> for ArrayValue
impl From<Box<[ConstrainedFloat<f32, UnitConstraint<f32>>]>> for ArrayValue
Source§impl From<Box<[ConstrainedFloat<f64, UnitConstraint<f64>>]>> for ArrayValue
impl From<Box<[ConstrainedFloat<f64, UnitConstraint<f64>>]>> for ArrayValue
Source§impl From<Box<[ProductValue]>> for ArrayValue
impl From<Box<[ProductValue]>> for ArrayValue
Source§fn from(v: Box<[ProductValue]>) -> Self
fn from(v: Box<[ProductValue]>) -> Self
Source§impl Hash for ArrayValue
The hash function for an ArrayValue only hashes its domain types.
This avoids the hashing Discriminant<ArrayValue>
which is OK as a table column will only ever have the same type (and so the same discriminant).
The hash function will however length-prefix as the value is of variable length.
impl Hash for ArrayValue
The hash function for an ArrayValue only hashes its domain types.
This avoids the hashing Discriminant<ArrayValue>
which is OK as a table column will only ever have the same type (and so the same discriminant).
The hash function will however length-prefix as the value is of variable length.
Source§impl IntoIterator for ArrayValue
impl IntoIterator for ArrayValue
Source§impl Ord for ArrayValue
impl Ord for ArrayValue
Source§fn cmp(&self, other: &ArrayValue) -> Ordering
fn cmp(&self, other: &ArrayValue) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for ArrayValue
impl PartialEq for ArrayValue
Source§impl PartialOrd for ArrayValue
impl PartialOrd for ArrayValue
Source§impl Serialize for ArrayValue
impl Serialize for ArrayValue
Source§impl SizeOf for ArrayValue
impl SizeOf for ArrayValue
Source§fn size_of(&self) -> usize
fn size_of(&self) -> usize
impl Eq for ArrayValue
impl StructuralPartialEq for ArrayValue
Auto Trait Implementations§
impl Freeze for ArrayValue
impl RefUnwindSafe for ArrayValue
impl Send for ArrayValue
impl Sync for ArrayValue
impl Unpin for ArrayValue
impl UnwindSafe for ArrayValue
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Satn for T
impl<T> Satn for T
Source§fn fmt(&self, f: &mut Formatter<'_>) -> Result
fn fmt(&self, f: &mut Formatter<'_>) -> Result
f.Source§fn fmt_psql(&self, f: &mut Formatter<'_>, ty: &PsqlType<'_>) -> Result
fn fmt_psql(&self, f: &mut Formatter<'_>, ty: &PsqlType<'_>) -> Result
f.Source§fn to_satn(&self) -> String
fn to_satn(&self) -> String
String.Source§fn to_satn_pretty(&self) -> String
fn to_satn_pretty(&self) -> String
String.