pub enum ConstructedValue {
Show 13 variants
Absent,
Declared {
value: Box<ConstructedValue>,
declaration: DeclaredType<()>,
},
Boolean(bool),
Integer(i64),
Float(f64),
String(String),
Member(NominalMember),
KeyedArray {
axes: Vec<KeyAxis>,
entries: Vec<KeyedEntry>,
},
Array(Vec<ConstructedValue>),
Tuple(Vec<ConstructedValue>),
Record(Vec<(String, ConstructedValue)>),
Dictionary(Dictionary),
Set {
element_type: Option<SetElementType>,
elements: SetElements,
},
}Expand description
Owned constructed data. Arrays have positive one-based positions. Tuples and
records retain field order; sets retain each first inserted element.
Keyed arrays retain nonzero typed axes and sparse row-major entries; supplied
axes need not be contiguous or cover a full Cartesian product.
Public construction is checked by the budgeted entry points before use.
Derived Rust equality compares stored representations. Language set and
dictionary equality compares membership and associations respectively.
There is deliberately no deep Clone; use copy_constructed_value.
Variants§
Absent
Declared
An admitted immutable value with an explicit constructed declaration.
Boolean(bool)
Integer(i64)
Float(f64)
String(String)
Member(NominalMember)
KeyedArray
Array(Vec<ConstructedValue>)
Tuple(Vec<ConstructedValue>)
Record(Vec<(String, ConstructedValue)>)
Dictionary(Dictionary)
General keys and values, retaining insertion order. String-only dictionaries use Record for structural field access and existing host compatibility.
Set
Implementations§
Source§impl ConstructedValue
impl ConstructedValue
Sourcepub fn data(&self) -> &ConstructedValue
pub fn data(&self) -> &ConstructedValue
Borrow data through its transparent declaration annotation.
Sourcepub fn occurs(&self) -> bool
pub fn occurs(&self) -> bool
Whether this value is present, including false, zero and empty data.
Sourcepub fn into_data(self) -> ConstructedValue
pub fn into_data(self) -> ConstructedValue
Consume transparent annotations when crossing an explicit data boundary.