pub enum Value {
Int(IntValue),
String(StringValue),
Seq(SeqValue),
Map(MapValue),
Float(FloatValue),
Bytes(BytesValue),
Bool(BoolValue),
Unit(UnitValue),
Null(NullValue),
}Expand description
Represents a value.
Variants§
Int(IntValue)
Represents a integer number.
String(StringValue)
Represents a string.
Seq(SeqValue)
Represents a sequence of values.
Map(MapValue)
Represents a map of key-value pairs.
By default the map is backed by a BTreeMap. Enable the preserve_order
feature of serde_lilliput to use OrderMap instead, which preserves
entries in the order they are inserted into the map.
Float(FloatValue)
Represents a floating-point number.
Bytes(BytesValue)
Represents a byte array.
Bool(BoolValue)
Represents a boolean.
Unit(UnitValue)
Represents a unit value.
Null(NullValue)
Represents a null value.
Trait Implementations§
Source§impl From<BytesValue> for Value
impl From<BytesValue> for Value
Source§fn from(value: BytesValue) -> Self
fn from(value: BytesValue) -> Self
Converts to this type from the input type.
Source§impl From<FloatValue> for Value
impl From<FloatValue> for Value
Source§fn from(value: FloatValue) -> Self
fn from(value: FloatValue) -> Self
Converts to this type from the input type.
Source§impl From<StringValue> for Value
impl From<StringValue> for Value
Source§fn from(value: StringValue) -> Self
fn from(value: StringValue) -> Self
Converts to this type from the input type.
Source§impl Ord for Value
impl Ord for Value
Source§impl PartialOrd for Value
impl PartialOrd for Value
impl Eq for Value
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