pub enum Value {
}Variants§
Bool(bool)
U8(u8)
U16(u16)
U32(u32)
U64(u64)
I8(i8)
I16(i16)
I32(i32)
I64(i64)
F32(f32)
F64(f64)
Str(String)
Bytes(Vec<u8>)
Enum(u32)
Raw enum value; enums are open, so this need not name a known variant.
List(Vec<Value>)
Struct(Vec<(u16, Value)>)
(field id, value) pairs. Order does not matter; duplicate ids are an encode-time error.
Map(Vec<(Value, Value)>)
(key, value) entries. Order does not matter — the encoder sorts entries by key into canonical order; duplicate keys are an encode-time error.
Scalars(Scalars)
A list of scalars in native form — the bulk-write peer of
Scalars. Encodes byte-identically to the equivalent
Value::List, without allocating a Value per element.
Union(u32, Box<Value>)
A union value: the variant tag (index into the schema’s variant list)
and that variant’s value.
Implementations§
Trait Implementations§
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 UnsafeUnpin 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