pub enum Value {
Nil,
Bool(bool),
Bin(Vec<u8>),
Extension {
type: i8,
data: Vec<u8>,
},
Number(Number),
String(String),
Array(Vec<Value>),
Map(Vec<(Value, Value)>),
}Available on crate feature
alloc only.Expand description
Owned representation of any MessagePack value.
Variants§
Nil
Represents nil format.
Bool(bool)
Represents bool format family.
Bin(Vec<u8>)
Represents bin 8, bin 16 and bin 32.
Extension
Represents ext format family as owned bytes.
Number(Number)
Represents int format family and float format family.
String(String)
Represents str format family.
Array(Vec<Value>)
Represents array format family.
Map(Vec<(Value, Value)>)
Represents map format family.
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 PartialOrd for Value
impl PartialOrd 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