pub enum FormatError {
Show 21 variants
BadMagic {
got: [u8; 4],
},
TruncatedHeader {
got: usize,
expected: usize,
},
UnsupportedVersion {
major: u16,
minor: u16,
},
TruncatedSuperblock {
got: usize,
expected: usize,
},
BadSuperblockMagic {
got: [u8; 4],
},
BadSuperblockChecksum,
TruncatedSegmentHeader {
got: usize,
expected: usize,
},
BadSegmentMagic {
got: [u8; 4],
},
BadSegmentHeaderChecksum,
BadSegmentPayloadChecksum,
SegmentPayloadPastEof,
InvalidCatalogPayload {
message: String,
},
TruncatedRecordPayload,
RecordPayloadTypeMismatch,
InvalidRecordUtf8,
RecordPayloadUnsupportedType,
UnknownRecordPayloadVersion {
got: u16,
},
TrailingRecordPayload,
InvalidTxnPayload {
message: String,
},
InvalidCheckpointPayload {
message: String,
},
UncleanLogTail {
safe_end: u64,
reason: &'static str,
},
}Expand description
Low-level decode/validation failures for bytes read from the store.
Variants§
BadMagic
File magic was not TDB0.
TruncatedHeader
Fewer bytes than expected for a fixed-size header region.
UnsupportedVersion
Header or manifest reported an unsupported format or manifest version.
TruncatedSuperblock
Superblock slice shorter than [crate::superblock::SUPERBLOCK_SIZE].
BadSuperblockMagic
Superblock magic was not TSB0.
BadSuperblockChecksum
Superblock CRC did not match payload.
TruncatedSegmentHeader
Segment header slice shorter than expected.
BadSegmentMagic
Segment header magic was not TSG0.
BadSegmentHeaderChecksum
Header CRC32C did not match header bytes.
BadSegmentPayloadChecksum
Payload CRC32C did not match segment body.
SegmentPayloadPastEof
Declared payload length would extend past the file end.
InvalidCatalogPayload
Invalid catalog segment payload (binary layout).
TruncatedRecordPayload
Record segment payload truncated or malformed.
RecordPayloadTypeMismatch
Record payload type tag did not match schema.
InvalidRecordUtf8
UTF-8 in a record string field was invalid.
RecordPayloadUnsupportedType
Record payload used a composite type not supported in v1 row encoding.
UnknownRecordPayloadVersion
Record payload version not supported.
TrailingRecordPayload
Extra bytes after a decoded record payload.
InvalidTxnPayload
Transaction marker segment payload was malformed.
InvalidCheckpointPayload
Checkpoint payload references a replay offset before the checkpoint segment end.
UncleanLogTail
On-disk log ends with an incomplete transaction or torn write; strict open refuses to modify.