Enum spacetimedb_sats::array_value::ArrayValue
source · pub enum ArrayValue {
Show 18 variants
Sum(Vec<SumValue>),
Product(Vec<ProductValue>),
Bool(Vec<bool>),
I8(Vec<i8>),
U8(Vec<u8>),
I16(Vec<i16>),
U16(Vec<u16>),
I32(Vec<i32>),
U32(Vec<u32>),
I64(Vec<i64>),
U64(Vec<u64>),
I128(Vec<i128>),
U128(Vec<u128>),
F32(Vec<F32>),
F64(Vec<F64>),
String(Vec<String>),
Array(Vec<ArrayValue>),
Map(Vec<MapValue>),
}
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(Vec<SumValue>)
An array of SumValue
s.
Product(Vec<ProductValue>)
An array of ProductValue
s.
Bool(Vec<bool>)
An array of bool
s.
I8(Vec<i8>)
An array of i8
s.
U8(Vec<u8>)
An array of u8
s.
I16(Vec<i16>)
An array of i16
s.
U16(Vec<u16>)
An array of u16
s.
I32(Vec<i32>)
An array of i32
s.
U32(Vec<u32>)
An array of u32
s.
I64(Vec<i64>)
An array of i64
s.
U64(Vec<u64>)
An array of u64
s.
I128(Vec<i128>)
An array of i128
s.
U128(Vec<u128>)
An array of u128
s.
F32(Vec<F32>)
An array of totally ordered F32
s.
F64(Vec<F64>)
An array of totally ordered F64
s.
String(Vec<String>)
An array of UTF-8 strings.
Array(Vec<ArrayValue>)
An array of arrays.
Map(Vec<MapValue>)
An array of maps.
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 AlgebraicValue
s.
Trait Implementations§
source§impl Clone for ArrayValue
impl Clone for ArrayValue
source§fn clone(&self) -> ArrayValue
fn clone(&self) -> ArrayValue
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
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
Converts to this type from the input type.
source§impl<const N: usize> From<[BTreeMap<AlgebraicValue, AlgebraicValue>; N]> for ArrayValue
impl<const N: usize> From<[BTreeMap<AlgebraicValue, AlgebraicValue>; N]> for ArrayValue
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
Converts to this type from the input type.
source§impl From<ArrayValue> for AlgebraicValue
impl From<ArrayValue> for AlgebraicValue
source§fn from(original: ArrayValue) -> AlgebraicValue
fn from(original: ArrayValue) -> AlgebraicValue
Converts to this type from the input type.
source§impl From<Vec<ArrayValue>> for ArrayValue
impl From<Vec<ArrayValue>> for ArrayValue
source§fn from(v: Vec<ArrayValue>) -> Self
fn from(v: Vec<ArrayValue>) -> Self
Converts to this type from the input type.
source§impl From<Vec<BTreeMap<AlgebraicValue, AlgebraicValue>>> for ArrayValue
impl From<Vec<BTreeMap<AlgebraicValue, AlgebraicValue>>> for ArrayValue
source§impl From<Vec<ConstrainedFloat<f32, UnitConstraint<f32>>>> for ArrayValue
impl From<Vec<ConstrainedFloat<f32, UnitConstraint<f32>>>> for ArrayValue
source§impl From<Vec<ConstrainedFloat<f64, UnitConstraint<f64>>>> for ArrayValue
impl From<Vec<ConstrainedFloat<f64, UnitConstraint<f64>>>> for ArrayValue
source§impl From<Vec<ProductValue>> for ArrayValue
impl From<Vec<ProductValue>> for ArrayValue
source§fn from(v: Vec<ProductValue>) -> Self
fn from(v: Vec<ProductValue>) -> Self
Converts to this type from the input type.
source§impl Hash for ArrayValue
impl Hash for ArrayValue
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,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for ArrayValue
impl PartialEq for ArrayValue
source§fn eq(&self, other: &ArrayValue) -> bool
fn eq(&self, other: &ArrayValue) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for ArrayValue
impl PartialOrd for ArrayValue
source§fn partial_cmp(&self, other: &ArrayValue) -> Option<Ordering>
fn partial_cmp(&self, other: &ArrayValue) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl Serialize for ArrayValue
impl Serialize for ArrayValue
impl Eq for ArrayValue
impl StructuralPartialEq for ArrayValue
Auto Trait Implementations§
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
Mutably borrows from an owned value. Read more
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§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
Formats the value using the SATN data format into the formatter
f
.source§fn fmt_psql(&self, f: &mut Formatter<'_>) -> Result
fn fmt_psql(&self, f: &mut Formatter<'_>) -> Result
Formats the value using the postgres SATN data format into the formatter
f
.source§fn to_satn(&self) -> String
fn to_satn(&self) -> String
Formats the value using the SATN data format into the returned
String
.source§fn to_satn_pretty(&self) -> String
fn to_satn_pretty(&self) -> String
Pretty prints the value using the SATN data format into the returned
String
.