pub enum Value {
Unit,
Boolean(bool),
Integer(i64),
Number(f64),
String(String),
Bytes(Vec<u8>),
Record(BTreeMap<String, Value>),
List(Vec<Value>),
}Expand description
A schema-neutral logical protocol value.
Enum cases, union cases, entries, and JSON are interpretations imposed by a descriptor. They are deliberately not variants of this enum. Record key ordering is not protocol-significant.
Variants§
Unit
A value carrying no data; it also represents JSON null under Json.
Boolean(bool)
A boolean.
Integer(i64)
A JavaScript-lossless integer.
Number(f64)
A finite IEEE-754 binary64 number.
String(String)
A Unicode string.
Bytes(Vec<u8>)
An opaque byte sequence.
Record(BTreeMap<String, Value>)
String-keyed fields with order-insensitive semantics.
List(Vec<Value>)
An ordered sequence.
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