Enum cbor_data::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 {
unix_epoch: i64,
nanos: u32,
tz_sec_east: i32,
},
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
Fields
unix_epoch: i64timestamp value in seconds since the Unix epoch
nanos: u32fractional part in nanoseconds, to be added
tz_sec_east: i32timezone to use when encoding as a string
Str(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
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