Enum cbor_event::Value
source · pub enum Value {
U64(u64),
I64(i64),
Bytes(Vec<u8>),
Text(String),
Array(Vec<Value>),
IArray(Vec<Value>),
Object(BTreeMap<ObjectKey, Value>),
IObject(BTreeMap<ObjectKey, Value>),
Tag(u64, Box<Value>),
Special(Special),
}
Expand description
All possible CBOR supported values.
We advise not to use these objects as an intermediary representation before retrieving custom types as it is a slow and not memory efficient way to do so. However it is handy for debugging or reverse a given protocol.
Variants§
U64(u64)
I64(i64)
Bytes(Vec<u8>)
Text(String)
Array(Vec<Value>)
IArray(Vec<Value>)
Object(BTreeMap<ObjectKey, Value>)
IObject(BTreeMap<ObjectKey, Value>)
Tag(u64, Box<Value>)
Special(Special)
Trait Implementations§
source§impl Deserialize for Value
impl Deserialize for Value
source§fn deserialize<R: BufRead>(raw: &mut Deserializer<R>) -> Result<Self>
fn deserialize<R: BufRead>(raw: &mut Deserializer<R>) -> Result<Self>
method to implement to deserialise an object from the given
Deserializer
. Read moresource§impl PartialOrd<Value> for Value
impl PartialOrd<Value> for Value
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read more