Enum spacetimedb_lib::AlgebraicValue
source · pub enum AlgebraicValue {
Show 18 variants
Sum(SumValue),
Product(ProductValue),
Array(ArrayValue),
Map(BTreeMap<AlgebraicValue, AlgebraicValue>),
Bool(bool),
I8(i8),
U8(u8),
I16(i16),
U16(u16),
I32(i32),
U32(u32),
I64(i64),
U64(u64),
I128(i128),
U128(u128),
F32(ConstrainedFloat<f32, UnitConstraint<f32>>),
F64(ConstrainedFloat<f64, UnitConstraint<f64>>),
String(String),
}Expand description
A value in SATS typed at some AlgebraicType.
Values are type erased, so they do not store their type. This is important mainly for space efficiency, including network latency and bandwidth.
These are only values and not expressions.
That is, they are canonical and cannot be simplified further by some evaluation.
So forms like 42 + 24 are not represented in an AlgebraicValue.
Variants§
Sum(SumValue)
A structural sum value.
Given a sum type { N_0(T_0), N_1(T_1), ..., N_n(T_n) }
where N_i denotes a variant name
and where T_i denotes the type the variant stores,
a sum value makes a specific choice as to the variant.
So for example, we might chose N_1(T_1)
and represent this choice with (1, v) where v is a value of type T_1.
Product(ProductValue)
A structural product value.
Given a product type { N_0: T_0, N_1: T_1, ..., N_n: T_n }
where N_i denotes a field / element name
and where T_i denotes the type the field stores,
a product value stores a value v_i of type T_i for each field N_i.
Array(ArrayValue)
A homogeneous array of AlgebraicValues.
The array has the type [AlgebraicType::Array(elem_ty)].
The contained values are stored packed in a representation appropriate for their type.
See ArrayValue for details on the representation.
Map(BTreeMap<AlgebraicValue, AlgebraicValue>)
An ordered map value of key: AlgebraicValues mapped to value: AlgebraicValues.
Each key must be of the same AlgebraicType as all the others
and the same applies to each value.
A map as a whole has the type [AlgebraicType::Map(key_ty, val_ty)].
Maps are implemented internally as [BTreeMap<AlgebraicValue, AlgebraicValue>].
This implies that key/values are ordered first by key and then value
as if they were a sorted slice [(key, value)].
This order is observable as maps are exposed both directly
and indirectly via Ord for AlgebraicValue.
The latter lets us observe that e.g., { a: 42 } < { b: 42 }.
However, we cannot observe any difference between { a: 0, b: 0 } and { b: 0, a: 0 },
as the natural order is used as opposed to insertion order.
Where insertion order is relevant,
a AlgebraicValue::Array with (key, value) pairs can be used instead.
We box the MapValue to reduce size
and because we assume that map values will be uncommon.
Bool(bool)
A bool value of type AlgebraicType::Bool.
I8(i8)
An i8 value of type AlgebraicType::I8.
U8(u8)
A u8 value of type AlgebraicType::U8.
I16(i16)
An i16 value of type AlgebraicType::I16.
U16(u16)
A u16 value of type AlgebraicType::U16.
I32(i32)
An i32 value of type AlgebraicType::I32.
U32(u32)
A u32 value of type AlgebraicType::U32.
I64(i64)
An i64 value of type AlgebraicType::I64.
U64(u64)
A u64 value of type AlgebraicType::U64.
I128(i128)
An i128 value of type AlgebraicType::I128.
We box these up as they allow us to shrink AlgebraicValue.
U128(u128)
A u128 value of type AlgebraicType::U128.
We box these up as they allow us to shrink AlgebraicValue.
F32(ConstrainedFloat<f32, UnitConstraint<f32>>)
A totally ordered F32 value of type AlgebraicType::F32.
All floating point values defined in IEEE-754 are supported.
However, unlike the primitive f32, a total order is established.
F64(ConstrainedFloat<f64, UnitConstraint<f64>>)
A totally ordered F64 value of type AlgebraicType::F64.
All floating point values defined in IEEE-754 are supported.
However, unlike the primitive f64, a total order is established.
String(String)
A UTF-8 string value of type AlgebraicType::String.
Uses Rust’s standard representation of strings.
Implementations§
source§impl AlgebraicValue
impl AlgebraicValue
sourcepub fn as_sum_mut(&mut self) -> Option<&mut SumValue>
pub fn as_sum_mut(&mut self) -> Option<&mut SumValue>
Optionally returns mutable references to the inner fields if this is a AlgebraicValue::Sum, otherwise None
sourcepub fn as_sum(&self) -> Option<&SumValue>
pub fn as_sum(&self) -> Option<&SumValue>
Optionally returns references to the inner fields if this is a AlgebraicValue::Sum, otherwise None
sourcepub fn into_sum(self) -> Result<SumValue, AlgebraicValue>
pub fn into_sum(self) -> Result<SumValue, AlgebraicValue>
Returns the inner fields if this is a AlgebraicValue::Sum, otherwise returns back the enum in the Err case of the result
sourcepub fn is_product(&self) -> bool
pub fn is_product(&self) -> bool
Returns true if this is a AlgebraicValue::Product, otherwise false
sourcepub fn as_product_mut(&mut self) -> Option<&mut ProductValue>
pub fn as_product_mut(&mut self) -> Option<&mut ProductValue>
Optionally returns mutable references to the inner fields if this is a AlgebraicValue::Product, otherwise None
sourcepub fn as_product(&self) -> Option<&ProductValue>
pub fn as_product(&self) -> Option<&ProductValue>
Optionally returns references to the inner fields if this is a AlgebraicValue::Product, otherwise None
sourcepub fn into_product(self) -> Result<ProductValue, AlgebraicValue>
pub fn into_product(self) -> Result<ProductValue, AlgebraicValue>
Returns the inner fields if this is a AlgebraicValue::Product, otherwise returns back the enum in the Err case of the result
sourcepub fn is_array(&self) -> bool
pub fn is_array(&self) -> bool
Returns true if this is a AlgebraicValue::Array, otherwise false
sourcepub fn as_array_mut(&mut self) -> Option<&mut ArrayValue>
pub fn as_array_mut(&mut self) -> Option<&mut ArrayValue>
Optionally returns mutable references to the inner fields if this is a AlgebraicValue::Array, otherwise None
sourcepub fn as_array(&self) -> Option<&ArrayValue>
pub fn as_array(&self) -> Option<&ArrayValue>
Optionally returns references to the inner fields if this is a AlgebraicValue::Array, otherwise None
sourcepub fn into_array(self) -> Result<ArrayValue, AlgebraicValue>
pub fn into_array(self) -> Result<ArrayValue, AlgebraicValue>
Returns the inner fields if this is a AlgebraicValue::Array, otherwise returns back the enum in the Err case of the result
sourcepub fn as_map_mut(
&mut self
) -> Option<&mut BTreeMap<AlgebraicValue, AlgebraicValue>>
pub fn as_map_mut( &mut self ) -> Option<&mut BTreeMap<AlgebraicValue, AlgebraicValue>>
Optionally returns mutable references to the inner fields if this is a AlgebraicValue::Map, otherwise None
sourcepub fn as_map(&self) -> Option<&BTreeMap<AlgebraicValue, AlgebraicValue>>
pub fn as_map(&self) -> Option<&BTreeMap<AlgebraicValue, AlgebraicValue>>
Optionally returns references to the inner fields if this is a AlgebraicValue::Map, otherwise None
sourcepub fn into_map(
self
) -> Result<BTreeMap<AlgebraicValue, AlgebraicValue>, AlgebraicValue>
pub fn into_map( self ) -> Result<BTreeMap<AlgebraicValue, AlgebraicValue>, AlgebraicValue>
Returns the inner fields if this is a AlgebraicValue::Map, otherwise returns back the enum in the Err case of the result
sourcepub fn as_bool_mut(&mut self) -> Option<&mut bool>
pub fn as_bool_mut(&mut self) -> Option<&mut bool>
Optionally returns mutable references to the inner fields if this is a AlgebraicValue::Bool, otherwise None
sourcepub fn as_bool(&self) -> Option<&bool>
pub fn as_bool(&self) -> Option<&bool>
Optionally returns references to the inner fields if this is a AlgebraicValue::Bool, otherwise None
sourcepub fn into_bool(self) -> Result<bool, AlgebraicValue>
pub fn into_bool(self) -> Result<bool, AlgebraicValue>
Returns the inner fields if this is a AlgebraicValue::Bool, otherwise returns back the enum in the Err case of the result
sourcepub fn as_i8_mut(&mut self) -> Option<&mut i8>
pub fn as_i8_mut(&mut self) -> Option<&mut i8>
Optionally returns mutable references to the inner fields if this is a AlgebraicValue::I8, otherwise None
sourcepub fn as_i8(&self) -> Option<&i8>
pub fn as_i8(&self) -> Option<&i8>
Optionally returns references to the inner fields if this is a AlgebraicValue::I8, otherwise None
sourcepub fn into_i8(self) -> Result<i8, AlgebraicValue>
pub fn into_i8(self) -> Result<i8, AlgebraicValue>
Returns the inner fields if this is a AlgebraicValue::I8, otherwise returns back the enum in the Err case of the result
sourcepub fn as_u8_mut(&mut self) -> Option<&mut u8>
pub fn as_u8_mut(&mut self) -> Option<&mut u8>
Optionally returns mutable references to the inner fields if this is a AlgebraicValue::U8, otherwise None
sourcepub fn as_u8(&self) -> Option<&u8>
pub fn as_u8(&self) -> Option<&u8>
Optionally returns references to the inner fields if this is a AlgebraicValue::U8, otherwise None
sourcepub fn into_u8(self) -> Result<u8, AlgebraicValue>
pub fn into_u8(self) -> Result<u8, AlgebraicValue>
Returns the inner fields if this is a AlgebraicValue::U8, otherwise returns back the enum in the Err case of the result
sourcepub fn as_i16_mut(&mut self) -> Option<&mut i16>
pub fn as_i16_mut(&mut self) -> Option<&mut i16>
Optionally returns mutable references to the inner fields if this is a AlgebraicValue::I16, otherwise None
sourcepub fn as_i16(&self) -> Option<&i16>
pub fn as_i16(&self) -> Option<&i16>
Optionally returns references to the inner fields if this is a AlgebraicValue::I16, otherwise None
sourcepub fn into_i16(self) -> Result<i16, AlgebraicValue>
pub fn into_i16(self) -> Result<i16, AlgebraicValue>
Returns the inner fields if this is a AlgebraicValue::I16, otherwise returns back the enum in the Err case of the result
sourcepub fn as_u16_mut(&mut self) -> Option<&mut u16>
pub fn as_u16_mut(&mut self) -> Option<&mut u16>
Optionally returns mutable references to the inner fields if this is a AlgebraicValue::U16, otherwise None
sourcepub fn as_u16(&self) -> Option<&u16>
pub fn as_u16(&self) -> Option<&u16>
Optionally returns references to the inner fields if this is a AlgebraicValue::U16, otherwise None
sourcepub fn into_u16(self) -> Result<u16, AlgebraicValue>
pub fn into_u16(self) -> Result<u16, AlgebraicValue>
Returns the inner fields if this is a AlgebraicValue::U16, otherwise returns back the enum in the Err case of the result
sourcepub fn as_i32_mut(&mut self) -> Option<&mut i32>
pub fn as_i32_mut(&mut self) -> Option<&mut i32>
Optionally returns mutable references to the inner fields if this is a AlgebraicValue::I32, otherwise None
sourcepub fn as_i32(&self) -> Option<&i32>
pub fn as_i32(&self) -> Option<&i32>
Optionally returns references to the inner fields if this is a AlgebraicValue::I32, otherwise None
sourcepub fn into_i32(self) -> Result<i32, AlgebraicValue>
pub fn into_i32(self) -> Result<i32, AlgebraicValue>
Returns the inner fields if this is a AlgebraicValue::I32, otherwise returns back the enum in the Err case of the result
sourcepub fn as_u32_mut(&mut self) -> Option<&mut u32>
pub fn as_u32_mut(&mut self) -> Option<&mut u32>
Optionally returns mutable references to the inner fields if this is a AlgebraicValue::U32, otherwise None
sourcepub fn as_u32(&self) -> Option<&u32>
pub fn as_u32(&self) -> Option<&u32>
Optionally returns references to the inner fields if this is a AlgebraicValue::U32, otherwise None
sourcepub fn into_u32(self) -> Result<u32, AlgebraicValue>
pub fn into_u32(self) -> Result<u32, AlgebraicValue>
Returns the inner fields if this is a AlgebraicValue::U32, otherwise returns back the enum in the Err case of the result
sourcepub fn as_i64_mut(&mut self) -> Option<&mut i64>
pub fn as_i64_mut(&mut self) -> Option<&mut i64>
Optionally returns mutable references to the inner fields if this is a AlgebraicValue::I64, otherwise None
sourcepub fn as_i64(&self) -> Option<&i64>
pub fn as_i64(&self) -> Option<&i64>
Optionally returns references to the inner fields if this is a AlgebraicValue::I64, otherwise None
sourcepub fn into_i64(self) -> Result<i64, AlgebraicValue>
pub fn into_i64(self) -> Result<i64, AlgebraicValue>
Returns the inner fields if this is a AlgebraicValue::I64, otherwise returns back the enum in the Err case of the result
sourcepub fn as_u64_mut(&mut self) -> Option<&mut u64>
pub fn as_u64_mut(&mut self) -> Option<&mut u64>
Optionally returns mutable references to the inner fields if this is a AlgebraicValue::U64, otherwise None
sourcepub fn as_u64(&self) -> Option<&u64>
pub fn as_u64(&self) -> Option<&u64>
Optionally returns references to the inner fields if this is a AlgebraicValue::U64, otherwise None
sourcepub fn into_u64(self) -> Result<u64, AlgebraicValue>
pub fn into_u64(self) -> Result<u64, AlgebraicValue>
Returns the inner fields if this is a AlgebraicValue::U64, otherwise returns back the enum in the Err case of the result
sourcepub fn as_i128_mut(&mut self) -> Option<&mut i128>
pub fn as_i128_mut(&mut self) -> Option<&mut i128>
Optionally returns mutable references to the inner fields if this is a AlgebraicValue::I128, otherwise None
sourcepub fn as_i128(&self) -> Option<&i128>
pub fn as_i128(&self) -> Option<&i128>
Optionally returns references to the inner fields if this is a AlgebraicValue::I128, otherwise None
sourcepub fn into_i128(self) -> Result<i128, AlgebraicValue>
pub fn into_i128(self) -> Result<i128, AlgebraicValue>
Returns the inner fields if this is a AlgebraicValue::I128, otherwise returns back the enum in the Err case of the result
sourcepub fn as_u128_mut(&mut self) -> Option<&mut u128>
pub fn as_u128_mut(&mut self) -> Option<&mut u128>
Optionally returns mutable references to the inner fields if this is a AlgebraicValue::U128, otherwise None
sourcepub fn as_u128(&self) -> Option<&u128>
pub fn as_u128(&self) -> Option<&u128>
Optionally returns references to the inner fields if this is a AlgebraicValue::U128, otherwise None
sourcepub fn into_u128(self) -> Result<u128, AlgebraicValue>
pub fn into_u128(self) -> Result<u128, AlgebraicValue>
Returns the inner fields if this is a AlgebraicValue::U128, otherwise returns back the enum in the Err case of the result
sourcepub fn as_f32_mut(
&mut self
) -> Option<&mut ConstrainedFloat<f32, UnitConstraint<f32>>>
pub fn as_f32_mut( &mut self ) -> Option<&mut ConstrainedFloat<f32, UnitConstraint<f32>>>
Optionally returns mutable references to the inner fields if this is a AlgebraicValue::F32, otherwise None
sourcepub fn as_f32(&self) -> Option<&ConstrainedFloat<f32, UnitConstraint<f32>>>
pub fn as_f32(&self) -> Option<&ConstrainedFloat<f32, UnitConstraint<f32>>>
Optionally returns references to the inner fields if this is a AlgebraicValue::F32, otherwise None
sourcepub fn into_f32(
self
) -> Result<ConstrainedFloat<f32, UnitConstraint<f32>>, AlgebraicValue>
pub fn into_f32( self ) -> Result<ConstrainedFloat<f32, UnitConstraint<f32>>, AlgebraicValue>
Returns the inner fields if this is a AlgebraicValue::F32, otherwise returns back the enum in the Err case of the result
sourcepub fn as_f64_mut(
&mut self
) -> Option<&mut ConstrainedFloat<f64, UnitConstraint<f64>>>
pub fn as_f64_mut( &mut self ) -> Option<&mut ConstrainedFloat<f64, UnitConstraint<f64>>>
Optionally returns mutable references to the inner fields if this is a AlgebraicValue::F64, otherwise None
sourcepub fn as_f64(&self) -> Option<&ConstrainedFloat<f64, UnitConstraint<f64>>>
pub fn as_f64(&self) -> Option<&ConstrainedFloat<f64, UnitConstraint<f64>>>
Optionally returns references to the inner fields if this is a AlgebraicValue::F64, otherwise None
sourcepub fn into_f64(
self
) -> Result<ConstrainedFloat<f64, UnitConstraint<f64>>, AlgebraicValue>
pub fn into_f64( self ) -> Result<ConstrainedFloat<f64, UnitConstraint<f64>>, AlgebraicValue>
Returns the inner fields if this is a AlgebraicValue::F64, otherwise returns back the enum in the Err case of the result
sourcepub fn is_string(&self) -> bool
pub fn is_string(&self) -> bool
Returns true if this is a AlgebraicValue::String, otherwise false
sourcepub fn as_string_mut(&mut self) -> Option<&mut String>
pub fn as_string_mut(&mut self) -> Option<&mut String>
Optionally returns mutable references to the inner fields if this is a AlgebraicValue::String, otherwise None
sourcepub fn as_string(&self) -> Option<&String>
pub fn as_string(&self) -> Option<&String>
Optionally returns references to the inner fields if this is a AlgebraicValue::String, otherwise None
sourcepub fn into_string(self) -> Result<String, AlgebraicValue>
pub fn into_string(self) -> Result<String, AlgebraicValue>
Returns the inner fields if this is a AlgebraicValue::String, otherwise returns back the enum in the Err case of the result
source§impl AlgebraicValue
impl AlgebraicValue
sourcepub fn as_bytes(&self) -> Option<&[u8]>
pub fn as_bytes(&self) -> Option<&[u8]>
Interpret the value as a byte slice or None if it isn’t a byte slice.
sourcepub fn unit() -> AlgebraicValue
pub fn unit() -> AlgebraicValue
The canonical unit value defined as the nullary product value ().
The type of UNIT is ().
sourcepub const fn Bytes(v: Vec<u8>) -> AlgebraicValue
pub const fn Bytes(v: Vec<u8>) -> AlgebraicValue
Returns an AlgebraicValue representing v: Vec<u8>.
sourcepub fn into_bytes(self) -> Result<Vec<u8>, AlgebraicValue>
pub fn into_bytes(self) -> Result<Vec<u8>, AlgebraicValue>
Converts self into a byte string, if applicable.
sourcepub fn OptionSome(v: AlgebraicValue) -> AlgebraicValue
pub fn OptionSome(v: AlgebraicValue) -> AlgebraicValue
Returns an AlgebraicValue for some: v.
The some variant is assigned the tag 0.
sourcepub fn OptionNone() -> AlgebraicValue
pub fn OptionNone() -> AlgebraicValue
Returns an AlgebraicValue for none.
The none variant is assigned the tag 1.
sourcepub fn sum(tag: u8, value: AlgebraicValue) -> AlgebraicValue
pub fn sum(tag: u8, value: AlgebraicValue) -> AlgebraicValue
Returns an AlgebraicValue representing a sum value with tag and value.
sourcepub const fn product(elements: Vec<AlgebraicValue>) -> AlgebraicValue
pub const fn product(elements: Vec<AlgebraicValue>) -> AlgebraicValue
Returns an AlgebraicValue representing a product value with the given elements.
sourcepub fn map(map: BTreeMap<AlgebraicValue, AlgebraicValue>) -> AlgebraicValue
pub fn map(map: BTreeMap<AlgebraicValue, AlgebraicValue>) -> AlgebraicValue
Returns an AlgebraicValue representing a map value defined by the given map.
sourcepub fn type_of(&self) -> AlgebraicType
pub fn type_of(&self) -> AlgebraicType
Infer the AlgebraicType of an AlgebraicValue.
sourcepub fn is_numeric_zero(&self) -> bool
pub fn is_numeric_zero(&self) -> bool
Returns whether this value represents a numeric zero.
Can only be true where the type is numeric.
source§impl AlgebraicValue
impl AlgebraicValue
sourcepub fn decode<'a>(
ty: &<AlgebraicValue as Value>::Type,
bytes: &mut impl BufReader<'a>
) -> Result<AlgebraicValue, DecodeError>
pub fn decode<'a>( ty: &<AlgebraicValue as Value>::Type, bytes: &mut impl BufReader<'a> ) -> Result<AlgebraicValue, DecodeError>
Decode a value from bytes typed at ty.
sourcepub fn decode_smallvec<'a>(
ty: &<AlgebraicValue as Value>::Type,
bytes: &mut impl BufReader<'a>
) -> Result<SmallVec<[AlgebraicValue; 1]>, DecodeError>
pub fn decode_smallvec<'a>( ty: &<AlgebraicValue as Value>::Type, bytes: &mut impl BufReader<'a> ) -> Result<SmallVec<[AlgebraicValue; 1]>, DecodeError>
Decode a vector of values from bytes with each value typed at ty.
pub fn encode(&self, bytes: &mut impl BufWriter)
Trait Implementations§
source§impl Clone for AlgebraicValue
impl Clone for AlgebraicValue
source§fn clone(&self) -> AlgebraicValue
fn clone(&self) -> AlgebraicValue
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for AlgebraicValue
impl Debug for AlgebraicValue
source§impl From<&[u8]> for AlgebraicValue
impl From<&[u8]> for AlgebraicValue
source§fn from(x: &[u8]) -> AlgebraicValue
fn from(x: &[u8]) -> AlgebraicValue
source§impl From<&AlgebraicValue> for ProductValue
impl From<&AlgebraicValue> for ProductValue
source§fn from(x: &AlgebraicValue) -> ProductValue
fn from(x: &AlgebraicValue) -> ProductValue
source§impl From<&str> for AlgebraicValue
impl From<&str> for AlgebraicValue
source§fn from(x: &str) -> AlgebraicValue
fn from(x: &str) -> AlgebraicValue
source§impl From<AlgebraicValue> for FieldExpr
impl From<AlgebraicValue> for FieldExpr
source§fn from(original: AlgebraicValue) -> FieldExpr
fn from(original: AlgebraicValue) -> FieldExpr
source§impl From<AlgebraicValue> for ProductValue
impl From<AlgebraicValue> for ProductValue
source§fn from(x: AlgebraicValue) -> ProductValue
fn from(x: AlgebraicValue) -> ProductValue
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<BTreeMap<AlgebraicValue, AlgebraicValue>> for AlgebraicValue
impl From<BTreeMap<AlgebraicValue, AlgebraicValue>> for AlgebraicValue
source§fn from(original: BTreeMap<AlgebraicValue, AlgebraicValue>) -> AlgebraicValue
fn from(original: BTreeMap<AlgebraicValue, AlgebraicValue>) -> AlgebraicValue
source§impl From<ColId> for AlgebraicValue
impl From<ColId> for AlgebraicValue
source§fn from(value: ColId) -> AlgebraicValue
fn from(value: ColId) -> AlgebraicValue
source§impl From<ConstraintId> for AlgebraicValue
impl From<ConstraintId> for AlgebraicValue
source§fn from(value: ConstraintId) -> AlgebraicValue
fn from(value: ConstraintId) -> AlgebraicValue
source§impl From<IndexId> for AlgebraicValue
impl From<IndexId> for AlgebraicValue
source§fn from(value: IndexId) -> AlgebraicValue
fn from(value: IndexId) -> AlgebraicValue
source§impl<T> From<Option<T>> for AlgebraicValuewhere
T: Into<AlgebraicValue>,
impl<T> From<Option<T>> for AlgebraicValuewhere
T: Into<AlgebraicValue>,
source§fn from(value: Option<T>) -> AlgebraicValue
fn from(value: Option<T>) -> AlgebraicValue
source§impl From<ProductValue> for AlgebraicValue
impl From<ProductValue> for AlgebraicValue
source§fn from(original: ProductValue) -> AlgebraicValue
fn from(original: ProductValue) -> AlgebraicValue
source§impl From<SequenceId> for AlgebraicValue
impl From<SequenceId> for AlgebraicValue
source§fn from(value: SequenceId) -> AlgebraicValue
fn from(value: SequenceId) -> AlgebraicValue
source§impl From<String> for AlgebraicValue
impl From<String> for AlgebraicValue
source§fn from(original: String) -> AlgebraicValue
fn from(original: String) -> AlgebraicValue
source§impl From<SumValue> for AlgebraicValue
impl From<SumValue> for AlgebraicValue
source§fn from(original: SumValue) -> AlgebraicValue
fn from(original: SumValue) -> AlgebraicValue
source§impl From<TableId> for AlgebraicValue
impl From<TableId> for AlgebraicValue
source§fn from(value: TableId) -> AlgebraicValue
fn from(value: TableId) -> AlgebraicValue
source§impl From<bool> for AlgebraicValue
impl From<bool> for AlgebraicValue
source§fn from(original: bool) -> AlgebraicValue
fn from(original: bool) -> AlgebraicValue
source§impl From<f32> for AlgebraicValue
impl From<f32> for AlgebraicValue
source§fn from(x: f32) -> AlgebraicValue
fn from(x: f32) -> AlgebraicValue
source§impl From<f64> for AlgebraicValue
impl From<f64> for AlgebraicValue
source§fn from(x: f64) -> AlgebraicValue
fn from(x: f64) -> AlgebraicValue
source§impl From<i128> for AlgebraicValue
impl From<i128> for AlgebraicValue
source§fn from(original: i128) -> AlgebraicValue
fn from(original: i128) -> AlgebraicValue
source§impl From<i16> for AlgebraicValue
impl From<i16> for AlgebraicValue
source§fn from(original: i16) -> AlgebraicValue
fn from(original: i16) -> AlgebraicValue
source§impl From<i32> for AlgebraicValue
impl From<i32> for AlgebraicValue
source§fn from(original: i32) -> AlgebraicValue
fn from(original: i32) -> AlgebraicValue
source§impl From<i64> for AlgebraicValue
impl From<i64> for AlgebraicValue
source§fn from(original: i64) -> AlgebraicValue
fn from(original: i64) -> AlgebraicValue
source§impl From<i8> for AlgebraicValue
impl From<i8> for AlgebraicValue
source§fn from(original: i8) -> AlgebraicValue
fn from(original: i8) -> AlgebraicValue
source§impl From<u128> for AlgebraicValue
impl From<u128> for AlgebraicValue
source§fn from(original: u128) -> AlgebraicValue
fn from(original: u128) -> AlgebraicValue
source§impl From<u16> for AlgebraicValue
impl From<u16> for AlgebraicValue
source§fn from(original: u16) -> AlgebraicValue
fn from(original: u16) -> AlgebraicValue
source§impl From<u32> for AlgebraicValue
impl From<u32> for AlgebraicValue
source§fn from(original: u32) -> AlgebraicValue
fn from(original: u32) -> AlgebraicValue
source§impl From<u64> for AlgebraicValue
impl From<u64> for AlgebraicValue
source§fn from(original: u64) -> AlgebraicValue
fn from(original: u64) -> AlgebraicValue
source§impl From<u8> for AlgebraicValue
impl From<u8> for AlgebraicValue
source§fn from(original: u8) -> AlgebraicValue
fn from(original: u8) -> AlgebraicValue
source§impl FromIterator<AlgebraicValue> for ProductValue
impl FromIterator<AlgebraicValue> for ProductValue
source§fn from_iter<T>(iter: T) -> ProductValuewhere
T: IntoIterator<Item = AlgebraicValue>,
fn from_iter<T>(iter: T) -> ProductValuewhere
T: IntoIterator<Item = AlgebraicValue>,
source§impl Hash for AlgebraicValue
impl Hash for AlgebraicValue
source§impl Ord for AlgebraicValue
impl Ord for AlgebraicValue
source§fn cmp(&self, other: &AlgebraicValue) -> Ordering
fn cmp(&self, other: &AlgebraicValue) -> 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 AlgebraicValue
impl PartialEq for AlgebraicValue
source§fn eq(&self, other: &AlgebraicValue) -> bool
fn eq(&self, other: &AlgebraicValue) -> bool
self and other values to be equal, and is used
by ==.source§impl PartialOrd for AlgebraicValue
impl PartialOrd for AlgebraicValue
source§fn partial_cmp(&self, other: &AlgebraicValue) -> Option<Ordering>
fn partial_cmp(&self, other: &AlgebraicValue) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self and other) and is used by the <=
operator. Read moresource§impl RangeBounds<AlgebraicValue> for AlgebraicValue
impl RangeBounds<AlgebraicValue> for AlgebraicValue
source§impl Serialize for AlgebraicValue
impl Serialize for AlgebraicValue
source§fn serialize<S>(
&self,
ser: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
ser: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
self in the data format of S using the provided serializer.source§impl Serialize for AlgebraicValue
impl Serialize for AlgebraicValue
source§fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl ToDataKey for AlgebraicValue
impl ToDataKey for AlgebraicValue
fn to_data_key(&self) -> DataKey
source§impl Value for AlgebraicValue
impl Value for AlgebraicValue
§type Type = AlgebraicType
type Type = AlgebraicType
impl Eq for AlgebraicValue
impl StructuralEq for AlgebraicValue
impl StructuralPartialEq for AlgebraicValue
Auto Trait Implementations§
impl RefUnwindSafe for AlgebraicValue
impl Send for AlgebraicValue
impl Sync for AlgebraicValue
impl Unpin for AlgebraicValue
impl UnwindSafe for AlgebraicValue
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> 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<(), Error>
fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>
f.source§fn fmt_psql(&self, f: &mut Formatter<'_>) -> Result<(), Error>
fn fmt_psql(&self, f: &mut Formatter<'_>) -> Result<(), Error>
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.