Expand description
Optional binary payload support for high-frequency extension data.
The binary codec is intentionally additive. Existing JSON StbString payloads
remain the compatibility format; callers opt into this module only after the
host and extension have negotiated the binary capability. Payloads are
length-bounded before decoding so this module is suitable for untrusted
extension input when the caller also enforces the surrounding frame limit.
Structs§
- Binary
Options - Bounds applied to a binary payload before encoding or decoding.
- StbBytes
- An owned byte buffer that can cross an ABI boundary as pointer plus length.
Enums§
- Binary
Error - Error returned by the binary codec.
Constants§
- DEFAULT_
MAX_ PAYLOAD_ LENGTH - Default maximum encoded payload size (16 MiB).
Functions§
- decode
- Decode one typed value from a complete CBOR payload.
- decode_
json - Decode a binary payload into a JSON value without going through a UTF-8 string or JSON parser.
- encode
- Encode one typed value as a compact CBOR payload.
- encode_
json - JSON-shaped convenience API for tool and event payloads that are still represented by dynamic values at the product boundary.
- free_
bytes ⚠ - Default deallocator for buffers created by
StbBytes::from_vec.
Type Aliases§
- Free
Bytes Fn - Producer-side deallocator for
StbBytes.