pub enum SqliteError {
Rusqlite(Error),
Pool(String),
LockPoisoned,
Migration(String),
SchemaTooNew {
found: i64,
supported: i64,
},
Backup(String),
}Expand description
Errors from the SQLite storage layer.
Variants§
Rusqlite(Error)
Pool(String)
LockPoisoned
No longer emitted after the r2d2 pool migration. Match SqliteError::Pool instead. Kept so older downstream match arms still compile.
Retained for back-compat with downstream match arms. New code
should emit SqliteError::Pool for connection-acquisition
failures; with the r2d2 pool we no longer hold a Mutex that
can poison. Treat any inbound LockPoisoned as equivalent to
Pool for routing decisions.
Migration(String)
SchemaTooNew
The on-disk schema is newer than this binary knows how to run. Forward-only migrations can’t walk a schema backwards, so opening would mean operating an old binary on a future schema — the data-corruption path. Refused unless the caller opts into a downgrade override.
Backup(String)
A pre-migration snapshot of the database could not be written. Treated as fatal: we will not mutate an existing schema without a recoverable copy in hand.
Trait Implementations§
Source§impl Debug for SqliteError
impl Debug for SqliteError
Source§impl Display for SqliteError
impl Display for SqliteError
Source§impl Error for SqliteError
impl Error for SqliteError
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()
Source§impl From<Error> for SqliteError
impl From<Error> for SqliteError
Auto Trait Implementations§
impl !RefUnwindSafe for SqliteError
impl !UnwindSafe for SqliteError
impl Freeze for SqliteError
impl Send for SqliteError
impl Sync for SqliteError
impl Unpin for SqliteError
impl UnsafeUnpin for SqliteError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more