Skip to main content

SqliteStoreError

Enum SqliteStoreError 

Source
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.

Fields

§domain: String
§found: i64
§supported: i64
§

MigrationFailed

A registered migration failed while being applied. The surrounding transaction is rolled back; the file is left at its prior version.

Fields

§domain: String
§version: i64
§name: String
§source: Error
§

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.

Fields

§domain: String
§version: i64
§name: String
§

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.

Fields

§detail: String
§

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.

Fields

§path: PathBuf
§actual: String
§

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.

Fields

§domain: String
§detail: String
§

OpenRefused

The connection profile refused the requested open (for example a non-creating profile pointed at a missing file).

Fields

§path: PathBuf
§profile: &'static str
§detail: String
§

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.)

Fields

§path: PathBuf

Trait Implementations§

Source§

impl Debug for SqliteStoreError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for SqliteStoreError

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for SqliteStoreError

Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<Error> for SqliteStoreError

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for SqliteStoreError

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.