Expand description
Strict CBOR codec for protocol values.
Port of the upstream packages/protocol/ module.
carries JSON-shaped values (null, bool, number, string, array, object), so
this codec implements exactly that subset of CBOR (RFC 8949) with the
defensive limits native uses for untrusted payloads:
- a maximum encoded byte length / string length (
DEFAULT_MAX_CBOR_BYTE_LENGTH), - a maximum container length (
DEFAULT_MAX_CBOR_CONTAINER_LENGTH), and - a maximum nesting depth (
DEFAULT_MAX_CBOR_DEPTH).
Structs§
- Cbor
Error - CBOR error.
- Cbor
Options - Codec limits (native
ResolvedCborOptions).
Constants§
- DEFAULT_
MAX_ CBOR_ BYTE_ LENGTH - Native
DEFAULT_MAX_CBOR_BYTE_LENGTH(16 MiB). - DEFAULT_
MAX_ CBOR_ CONTAINER_ LENGTH - Native
DEFAULT_MAX_CBOR_CONTAINER_LENGTH. - DEFAULT_
MAX_ CBOR_ DEPTH - Native
DEFAULT_MAX_CBOR_DEPTH.