Expand description
Concise Binary Object Representation (CBOR) formats.
This module implements the basic generic data model from RFC 8949.
It is allocation-gated because recursive generic values necessarily contain
Boxes and Vecs.
Definite byte and text strings borrow directly from the input;
allocation is needed only for fragmented strings and recursive items.
CborFmt<false> accepts the well-formed representation variants described
by RFC 8949. CborFmt<true> additionally requires preferred integer,
length, and tag arguments and rejects indefinite-length items (RFC 8949
section 4.2.1).
§Limitations
- Map-key ordering is not yet enforced in
CborFmt<true>. - Floating-point widths are retained in
CborFloat, so shortest-width floating-point normalization is likewise not yet imposed.
See the CBOR guide for the runtime workflow, ownership model, and deterministic-profile scope.
Re-exports§
pub use format::CborFmt;
Modules§
- format
- Recursive generic-CBOR format specifications, proofs, and execution.
Structs§
- Cbor
Head - A normalized CBOR initial byte and its optional argument.
- Cbor
Head Fmt - One normalized CBOR head.
- Cbor
Initial - The two bit fields in a CBOR initial byte (RFC 8949 section 3).
- Cbor
Initial Fmt - The fixed-width initial-byte bit-field format.
Enums§
- Cbor
Bytes - Runtime representation of a CBOR byte string.
- Cbor
Float - A CBOR floating-point payload.
- Cbor
Head Value - Semantic payload carried by a decoded CBOR head.
- Cbor
Text - Runtime representation of a CBOR text string.
- Cbor
Value - Generic CBOR value.
- Cbor
Value Spec - Logical value used by CBOR specifications.
- Major
Type - The eight CBOR major types from RFC 8949 section 3.1.
Constants§
- BREAK
- The CBOR break stop code (
0xff). - MAX_
RECURSION_ DEPTH - Default maximum nesting depth for generic CBOR values.