pub enum Value {
Show 53 variants
Null,
True,
False,
BF16(bf16),
F16(f16),
F32(f32),
F64(f64),
F128,
I8(i8),
I16(i16),
I32(i32),
I64(i64),
I128(i128),
U8(u8),
U16(u16),
U32(u32),
U64(u64),
U128(u128),
String(Vec<u8>),
StringObject(Vec<(Vec<u8>, Value)>),
I8Object(Vec<(i8, Value)>),
I16Object(Vec<(i16, Value)>),
I32Object(Vec<(i32, Value)>),
I64Object(Vec<(i64, Value)>),
I128Object(Vec<(i128, Value)>),
U8Object(Vec<(u8, Value)>),
U16Object(Vec<(u16, Value)>),
U32Object(Vec<(u32, Value)>),
U64Object(Vec<(u64, Value)>),
U128Object(Vec<(u128, Value)>),
BF16Array(Vec<bf16>),
F16Array(Vec<f16>),
F32Array(Vec<f32>),
F64Array(Vec<f64>),
F128Array,
I8Array(Vec<i8>),
I16Array(Vec<i16>),
I32Array(Vec<i32>),
I64Array(Vec<i64>),
I128Array(Vec<i128>),
U8Array(Vec<u8>),
U16Array(Vec<u16>),
U32Array(Vec<u32>),
U64Array(Vec<u64>),
U128Array(Vec<u128>),
BoolArray(usize, Vec<u8>),
StringArray(Vec<Vec<u8>>),
GenericArray(Vec<Value>),
Delimiter,
Tag(usize, Box<Value>),
Matrix {
layout: MatrixLayout,
extents: Box<Value>,
value: Box<Value>,
},
Complex(ComplexNumber),
Reserved,
}Expand description
An intermediate representation of values used during serialization.
This is a nearly 1:1 mapping to the HEADER | VALUE format in which BEVE values are encoded.
Objects are represented as a vector of key-value pairs, and strings are represented as their bytes.
Variants§
Null
True
False
BF16(bf16)
When the
half feature is disabled, this variant will carry no payload.
F16(f16)
When the
half feature is disabled, this variant will carry no payload.
F32(f32)
F64(f64)
F128
I8(i8)
I16(i16)
I32(i32)
I64(i64)
I128(i128)
U8(u8)
U16(u16)
U32(u32)
U64(u64)
U128(u128)
String(Vec<u8>)
StringObject(Vec<(Vec<u8>, Value)>)
I8Object(Vec<(i8, Value)>)
I16Object(Vec<(i16, Value)>)
I32Object(Vec<(i32, Value)>)
I64Object(Vec<(i64, Value)>)
I128Object(Vec<(i128, Value)>)
U8Object(Vec<(u8, Value)>)
U16Object(Vec<(u16, Value)>)
U32Object(Vec<(u32, Value)>)
U64Object(Vec<(u64, Value)>)
U128Object(Vec<(u128, Value)>)
BF16Array(Vec<bf16>)
F16Array(Vec<f16>)
F32Array(Vec<f32>)
F64Array(Vec<f64>)
F128Array
I8Array(Vec<i8>)
I16Array(Vec<i16>)
I32Array(Vec<i32>)
I64Array(Vec<i64>)
I128Array(Vec<i128>)
U8Array(Vec<u8>)
U16Array(Vec<u16>)
U32Array(Vec<u32>)
U64Array(Vec<u64>)
U128Array(Vec<u128>)
BoolArray(usize, Vec<u8>)
Note that field 1 contains u8s rather than bools. This is because it is meant to
be written directly to a writer during serialization, where each bit within each byte
represents a true or false value.
StringArray(Vec<Vec<u8>>)
GenericArray(Vec<Value>)
Delimiter
Tag(usize, Box<Value>)
Matrix
Fields
§
layout: MatrixLayoutComplex(ComplexNumber)
Reserved
Implementations§
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl TryFrom<&Value> for ObjectKind
impl TryFrom<&Value> for ObjectKind
impl StructuralPartialEq for Value
Auto Trait Implementations§
impl Freeze for Value
impl RefUnwindSafe for Value
impl Send for Value
impl Sync for Value
impl Unpin for Value
impl UnwindSafe for Value
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