Expand description
Binary framing of one staging batch:
b"AVBU" | u16 version | u32 header_len | JSON header | record bytes.
Integers are big-endian. The header names each record’s slot and length; record bytes follow back to back in header order with nothing after them. Decoding checks every bound and length before handing out any record, so a server can refuse a malformed batch without touching storage.
Structs§
Constants§
- CONTENT_
TYPE - MAGIC
- MAX_
BYTES - Upper bound on one encoded batch. A single record of at most
MAX_REQUEST_BYTESalways fits. - MAX_
HEADER - MAX_
PAYLOAD - Upper bound on the sum of record lengths in one batch.
- MAX_
RECORDS - VERSION
Functions§
- decode
- encode
- header_
len - The encoded header length, or
Noneif it exceedsMAX_HEADER.