pub enum FrameDecode {
Ok(FrameHeader),
SaltMismatch,
CrcInvalid,
Malformed,
}Expand description
Classified outcome of decoding a single WAL frame. Pass-2 of recovery
distinguishes “torn tail / stale generation” (silently discarded)
from “CRC mismatch in a frame that should have been valid” (which
surfaces as Error::WalCorruption). See docs/format.md
§ Recovery semantics.
Variants§
Ok(FrameHeader)
Salt matches and CRC validates — a usable frame.
SaltMismatch
The frame’s salt does not match expected_salt. The frame may
be torn-tail bytes from a previous generation or an in-progress
torn write; in either case it is not corruption.
CrcInvalid
Salt matches but the CRC32C does not validate. In pass 2 (frames
before the last commit marker) this is Error::WalCorruption;
in pass 1 / past the last commit it is torn tail.
Malformed
Reserved-flag bits or buffer-length problem. Treated as torn tail by recovery (forward-compat boundary).