Module cbor::value [] [src]

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 a Value AST. Values can be converted to native Rust types if possible and collections can be traversed using at or get.

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 type Simple (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 a Value::Tagged and ensure that the Tag and type of value match according to RFC 7049 section 2.4