Expand description
This module defines the generic Value
AST as well as
several other types to represent CBOR values.
A Cursor
can be used to deconstruct and traverse
a Value
.
Structs§
- Cursor
- A
Cursor
allows conventient navigation in aValue
AST.Value
s can be converted to native Rust types if possible and collections can be traversed usingat
orget
.
Enums§
- Bytes
- A unification of plain an indefinitly sized byte strings.
- Int
- Type to represent all possible CBOR integer values.
- Key
- CBOR allows heterogenous keys in objects. This enum unifies all currently allowed key types.
- Simple
- Most simple types (e.g.
bool
are covered elsewhere) but this value captures those value ranges of CBOR typeSimple
(major 7) which are either not assigned or reserved. - Text
- A unification of plain and indefinitly sized strings.
- Value
- The generic CBOR representation.
Functions§
- check
- Inspect the given
Value
which must be aValue::Tagged
and ensure that theTag
and type of value match according to RFC 7049 section 2.4