pub enum Value {
Show 33 variants
Unit,
Boolean(bool),
U8(u8),
U16(u16),
U32(u32),
U64(u64),
I8(i8),
I16(i16),
I32(i32),
I64(i64),
F32(f32),
F64(f64),
String(String),
Option(Option<Box<Value>>),
Structure(Structure),
Enumeration(Enumeration),
ArrayBoolean(Vec<bool>),
ArrayU8(Vec<u8>),
ArrayU16(Vec<u16>),
ArrayU32(Vec<u32>),
ArrayU64(Vec<u64>),
ArrayI8(Vec<i8>),
ArrayI16(Vec<i16>),
ArrayI32(Vec<i32>),
ArrayI64(Vec<i64>),
ArrayF32(Vec<f32>),
ArrayF64(Vec<f64>),
ArrayString(Vec<String>),
ArrayValue(Vec<Value>),
ArrayStructure {
id: Uuid,
elements: Vec<StructureWithoutId>,
},
ArrayEnumeration {
id: Uuid,
elements: Vec<EnumerationWithoutId>,
},
KeyValue(KeyValue),
Uuid(Uuid),
}Variants§
Unit
Boolean(bool)
U8(u8)
U16(u16)
U32(u32)
U64(u64)
I8(i8)
I16(i16)
I32(i32)
I64(i64)
F32(f32)
F64(f64)
String(String)
Option(Option<Box<Value>>)
Structure(Structure)
Enumeration(Enumeration)
ArrayBoolean(Vec<bool>)
ArrayU8(Vec<u8>)
ArrayU16(Vec<u16>)
ArrayU32(Vec<u32>)
ArrayU64(Vec<u64>)
ArrayI8(Vec<i8>)
ArrayI16(Vec<i16>)
ArrayI32(Vec<i32>)
ArrayI64(Vec<i64>)
ArrayF32(Vec<f32>)
ArrayF64(Vec<f64>)
ArrayString(Vec<String>)
ArrayValue(Vec<Value>)
ArrayStructure
ArrayEnumeration
KeyValue(KeyValue)
Uuid(Uuid)
Implementations§
Source§impl Value
impl Value
Sourcepub fn type_uuid(&self) -> Uuid
pub fn type_uuid(&self) -> Uuid
Returns the type UUID for this value.
Primitives map to well-known UUIDs from ty::mod. Structures and enumerations
carry their own type ID. Arrays of structures/enumerations use the element type ID.
Other compound types (plain arrays, Option, KeyValue, Uuid) have their own well-known UUIDs.
Source§impl Value
impl Value
Sourcepub fn array_of(element_id: Uuid, elements: Vec<Value>) -> Value
pub fn array_of(element_id: Uuid, elements: Vec<Value>) -> Value
Pack elements — values of one type, element_id — into the array form
the value plane uses for that type: the typed array of a primitive
(ArrayU8, ArrayString, …), ArrayStructure for structures,
ArrayEnumeration for enumerations, ArrayValue otherwise. An empty
array of a user type is packed by array_of_type,
which can tell a structure from an enumeration; here it is a structure.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Value
impl<'de> Deserialize<'de> for Value
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl From<Key> for Value
A key crosses the value plane as its bare path string (its arora type is
the string primitive).
impl From<Key> for Value
A key crosses the value plane as its bare path string (its arora type is the string primitive).