#[non_exhaustive]pub enum ChiselError {
Show 30 variants
InvalidHandle(u64),
NoActiveTransaction,
TransactionAlreadyActive,
SavepointNotFound(String),
DuplicateSavepoint(String),
ReadOnlyMode,
FileNotFound,
InvalidRootName,
RootNameTableFull,
InvalidSuperblockCount {
value: u32,
},
CacheFull {
limit: usize,
},
SpillwayFull {
limit_bytes: u64,
},
TransactionInProgress,
TagMismatch {
handle: u64,
expected: u32,
actual: u32,
},
IoError(Error),
ChecksumMismatch {
page_id: u64,
},
CorruptSuperblock {
defects: Vec<SlotDefect>,
},
FileSizeMismatch {
expected: u64,
actual: u64,
},
LockFailed,
UnsupportedFormatVersion {
found: u32,
expected: u32,
},
Poisoned,
CorruptPage {
page_id: u64,
},
InvalidPageId {
page_id: u64,
},
UnsupportedPageSize {
stored: u32,
compiled: u32,
},
NoEncryptionKey,
InvalidEncryptionKey,
EncryptionNotSupported,
NoFreeKeySlot,
LastKeySlot,
DecryptionFailed {
page_id: u64,
},
}Expand description
I36 (ISSUES.md, 2026-05-22): #[non_exhaustive] so adding a new
error variant (a future operational signal, a new fatal-corruption
flavor) is not a breaking change. External match arms over
ChiselError need a _ => … catchall; the conventional path is
if e.is_fatal() { … } else { … } which never enumerates
variants and is therefore unaffected. The Display impl below is
exhaustive — adding a variant still requires updating its prose.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
InvalidHandle(u64)
NoActiveTransaction
TransactionAlreadyActive
SavepointNotFound(String)
DuplicateSavepoint(String)
ReadOnlyMode
FileNotFound
InvalidRootName
RootNameTableFull
InvalidSuperblockCount
CacheFull
SpillwayFull
TransactionInProgress
TagMismatch
IoError(Error)
ChecksumMismatch
CorruptSuperblock
Fields
defects: Vec<SlotDefect>FileSizeMismatch
LockFailed
UnsupportedFormatVersion
Poisoned
CorruptPage
InvalidPageId
UnsupportedPageSize
NoEncryptionKey
InvalidEncryptionKey
EncryptionNotSupported
NoFreeKeySlot
LastKeySlot
DecryptionFailed
Implementations§
Source§impl ChiselError
impl ChiselError
Sourcepub fn is_fatal(&self) -> bool
pub fn is_fatal(&self) -> bool
True for error variants that indicate a violation of storage
integrity or an unrecoverable I/O condition. Operational errors
(caller mistakes like InvalidHandle) return false. Used by
TransactionManager to decide whether an error should poison the
manager — see ISSUES.md I1.
Poisoned itself is NOT fatal by this definition: it just means
the manager is already dead, so seeing it again should not trigger
a redundant state change.
INVARIANT: this match must list exactly the variants in the “Fatal”
block of the enum above. Adding a fatal variant without adding it here
silently leaves it classified operational, so the manager would keep
serving requests over questionable on-disk state — a durability hole,
not a compile error (the #[non_exhaustive] enum has no exhaustiveness
check to catch the omission).
Trait Implementations§
Source§impl Debug for ChiselError
impl Debug for ChiselError
Source§impl Display for ChiselError
impl Display for ChiselError
Source§impl Error for ChiselError
impl Error for ChiselError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
I41 (ISSUES.md, 2026-05-22): expose the wrapped io::Error from the
IoError variant so error-chain walkers (anyhow::Error::root_cause,
structured-logging adapters, eyre reports, std::error::Error::chain)
can see the underlying cause. Returns None for every other variant
because no other variant carries an inner error today. If a future
variant grows an inner cause, extend this match.
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()