Enum cbor_data::value::CborValue [−][src]
pub enum CborValue<'a> {
Array(Vec<Cow<'a, Cbor>>),
Dict(BTreeMap<Cow<'a, Cbor>, Cow<'a, Cbor>>),
Undefined,
Null,
Bool(bool),
Number(Number<'a>),
Timestamp(Timestamp),
Str(Cow<'a, str>),
Bytes(Cow<'a, [u8]>),
Invalid,
Unknown,
}Expand description
Lifted navigation structure for a CborValue.
You can obtain this using Cbor::decode().
This will reference existing bytes as much as possible, but in some cases it
has to allocate, e.g. when some needed slices are not contiguous in the underlying
Cbor.
Variants
Array(Vec<Cow<'a, Cbor>>)
Dict(BTreeMap<Cow<'a, Cbor>, Cow<'a, Cbor>>)
Undefined
Null
Bool(bool)
Tuple Fields
0: boolNumber(Number<'a>)
Tuple Fields
0: Number<'a>Timestamp(Timestamp)
Tuple Fields
0: TimestampStr(Cow<'a, str>)
Bytes(Cow<'a, [u8]>)
Invalid
Structural constraints for a tag are violated (like tag 0 on a number)
Unknown
Unknown tags are present, you may want to manually interpret the TaggedItem
Implementations
Cut all ties to the underlying byte slice, which often implies allocations
Trait Implementations
Auto Trait Implementations
impl<'a> RefUnwindSafe for CborValue<'a>
impl<'a> UnwindSafe for CborValue<'a>
Blanket Implementations
Mutably borrows from an owned value. Read more