#[non_exhaustive]pub enum Error {
Show 17 variants
Io(Error),
Decompress(CompressionType),
InvalidVersion(u8),
Unrecoverable,
ChecksumMismatch {
got: Checksum,
expected: Checksum,
},
HeaderCrcMismatch {
recomputed: u32,
stored: u32,
},
InvalidTag((&'static str, u8)),
InvalidTrailer,
InvalidHeader(&'static str),
DecompressedSizeTooLarge {
declared: u64,
limit: u64,
},
Utf8(Utf8Error),
MergeOperator,
Encrypt(&'static str),
Decrypt(&'static str),
ComparatorMismatch {
stored: String,
supplied: &'static str,
},
ZstdDictMismatch {
expected: u32,
got: Option<u32>,
},
RangeTombstoneDecode {
field: &'static str,
offset: u64,
},
}Expand description
Represents errors that can occur in the LSM-tree
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Io(Error)
I/O error
Decompress(CompressionType)
Decompression failed
InvalidVersion(u8)
Invalid or unparsable data format version
Unrecoverable
Some required files could not be recovered from disk
ChecksumMismatch
Checksum mismatch
Fields
got: ChecksumChecksum of loaded block
expected: ChecksumChecksum that was saved in block header
HeaderCrcMismatch
Blob frame header CRC mismatch (V4 format).
Distinct from ChecksumMismatch which covers data payload checksums.
Fields
InvalidTag((&'static str, u8))
Invalid enum tag
InvalidTrailer
Invalid block trailer
InvalidHeader(&'static str)
Invalid block header
DecompressedSizeTooLarge
Data size (decompressed, on-disk, or requested) is invalid or exceeds a safety limit
Fields
Utf8(Utf8Error)
UTF-8 error
MergeOperator
Merge operator failed.
No context payload — consistent with other unit variants
(Unrecoverable, InvalidTrailer). Operators should log
details before returning this error.
Encrypt(&'static str)
Encryption failed
Decrypt(&'static str)
Decryption failed
ComparatorMismatch
Comparator mismatch on tree reopen.
The tree was created with a comparator whose crate::UserComparator::name
differs from the one supplied at reopen time.
Fields
ZstdDictMismatch
Zstd dictionary required but not provided, or dict_id mismatch
Fields
RangeTombstoneDecode
Range tombstone block decode failure.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()