Expand description
Length-delimited framing: 4-byte big-endian length prefix + UTF-8 JSON body (spec §5).
Structs§
- Frame
Decoder - Incremental decoder: feed arbitrary chunks via
push, pull complete frame bodies vianext_frame. Tolerant of frames split across chunk boundaries.
Enums§
Constants§
- MAX_
FRAME_ LEN - Hard cap on a single frame body (16 MiB). A length prefix larger than this is rejected before any allocation, so a garbage/hostile length can’t OOM the host.
Functions§
- encode_
frame - Encode a payload as a 4-byte big-endian length prefix followed by the body.