pub enum SqliteStoreError {
Io(Error),
Sqlite(Error),
SchemaFromTheFuture {
domain: String,
found: i64,
supported: i64,
},
MigrationFailed {
domain: String,
version: i64,
name: String,
source: Error,
},
MigrationBrokeTransaction {
domain: String,
version: i64,
name: String,
},
LedgerMalformed {
detail: String,
},
WalNotEstablished {
path: PathBuf,
actual: String,
},
InvalidMigrationList {
domain: String,
detail: String,
},
OpenRefused {
path: PathBuf,
profile: &'static str,
detail: String,
},
MaintenanceFenceHeld {
path: PathBuf,
},
}Expand description
Errors produced by the shared SQLite mechanics.
Variants§
Io(Error)
Filesystem-level failure (creating parent directories, fence lock files, …).
Sqlite(Error)
Underlying SQLite failure.
SchemaFromTheFuture
The file’s schema ledger records a version newer than this binary supports. This is a refusal, not a corruption: a newer binary has migrated the file and this binary must not touch it. Surfaces report it as a typed, health-visible certification failure (a rollback candidate fails cleanly) rather than crash-looping.
MigrationFailed
A registered migration failed while being applied. The surrounding transaction is rolled back; the file is left at its prior version.
MigrationBrokeTransaction
A migration body ended the runner’s IMMEDIATE transaction (COMMIT or ROLLBACK, with or without re-BEGINning a fresh one), separating its schema work from the ledger stamp. Custody is verified after every body via a runner-owned savepoint; the domain is left unstamped.
LedgerMalformed
The meerkat_schema ledger table exists but is not the pinned shape
(domain TEXT PRIMARY KEY, version INTEGER NOT NULL), carries more
than one row for a domain, or records a non-positive version. This is
corrupt or foreign ledger state: it is refused, never healed by
re-running migrations over it.
WalNotEstablished
The Primary profile asked SQLite to establish journal_mode=WAL and
SQLite reported a different effective mode without raising an error
(the journal-mode pragma can silently keep the old mode). The
connection does not satisfy the profile’s durability policy.
InvalidMigrationList
A domain registered an invalid migration list (non-contiguous or not starting at version 1). This is a programming error in the store crate, caught before any file is touched.
OpenRefused
The connection profile refused the requested open (for example a non-creating profile pointed at a missing file).
MaintenanceFenceHeld
The exclusive maintenance fence is held for this database: storage is
under offline maintenance and the operation must not proceed. (Also
returned by crate::fence::ExclusiveFence::acquire when in-flight
operations did not drain within the deadline.)
Trait Implementations§
Source§impl Debug for SqliteStoreError
impl Debug for SqliteStoreError
Source§impl Display for SqliteStoreError
impl Display for SqliteStoreError
Source§impl Error for SqliteStoreError
impl Error for SqliteStoreError
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()