pub enum Error<F, R> {
Show 15 variants
Sqlite(Error),
DamagedDatabase,
Refused(R),
StatementForbidden {
operation: &'static str,
},
TransactionEnded,
Closed,
Bug(Bug),
HandleFailed(Bug),
Host(F),
Invariant {
what: &'static str,
},
WalUnavailable {
mode: String,
},
SqliteSettingOutOfRange {
setting: &'static str,
maximum: u64,
},
UpkeepThread(Error),
Path {
path: PathBuf,
source: Error,
},
Rollback {
operation: Box<Error<F, R>>,
rollback: Error,
},
}Expand description
Why a call failed.
Variants§
Sqlite(Error)
SQLite refused or failed a statement, preserving its error.
DamagedDatabase
A statement met damage SQLite reports (SQLITE_CORRUPT,
SQLITE_NOTADB).
Refused(R)
The host’s policy, or one of the host’s SQL functions, refused a statement with this refusal.
StatementForbidden
App SQL tried transaction control, a PRAGMA, ATTACH, loading an extension, changing a hidden rowid, or changing the schema outside a migration.
TransactionEnded
SQLite rolled the owned transaction back itself, so it can’t go on.
Closed
The handle has closed the database.
Bug(Bug)
The call’s work panicked: a bug, which the caller reports.
HandleFailed(Bug)
An earlier bug may have left the handle’s state wrong, so the handle failed with it, and every call fails with it until the host reopens the database.
Host(F)
The host failed the handle with this failure.
Invariant
sqlive broke a rule it relies on: a bug, not damage.
SQLite kept another journal mode instead of WAL.
SqliteSettingOutOfRange
A SQLite setting is larger than SQLite can hold.
Fields
UpkeepThread(Error)
The system refused a thread of sqlive’s upkeep, so the database did not open.
Path
Opening the database’s file at path failed. Only on Windows can a
name in the path mean another file once sqlive drops the path’s
verbatim prefix.
Rollback
A transaction failed and rolling it back failed too. The handle fails
with EngineFailure::Rollback.
Trait Implementations§
Source§impl<F: Error + 'static, R: Error + 'static> Error for Error<F, R>
impl<F: Error + 'static, R: Error + 'static> Error for Error<F, R>
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<F, R> RollbackJoin<F, R> for Error<F, R>
impl<F, R> RollbackJoin<F, R> for Error<F, R>
Source§fn with_rollback(self, rollback: Error) -> Self
fn with_rollback(self, rollback: Error) -> Self
rollback, SQLite’s failure to roll back, beside this error.