Skip to main content

Module record

Module record 

Source
Expand description

Byte-exact WAL record framing.

Structs§

DecodedRecord
A complete checked record plus its encoded width.
WalRecord
One decoded WAL record borrowing its checksummed payload.

Enums§

RecordEncodeError
Record encoding failure.
RecordError
Specific validation failure for one WAL record.

Constants§

MIN_RECORD_LEN
Smallest encoded WAL record.
RECORD_CHECKSUM_LEN
Width of the trailing xxh3-64 checksum.
RECORD_HEADER_LEN
Bytes before a WAL record payload: length, sequence, and operation.

Functions§

decode_record
Decodes one record and verifies xxh3-64 before returning any fields.
encode_record
Encodes [payload_len:u32, seq:u64, op:u16, payload, checksum:u64].