#[non_exhaustive]pub enum InitializationError<E> {
Show 20 variants
BusyTimeoutTooLarge {
milliseconds: u128,
},
BusyTimeout(Error),
JournalModeQuery(Error),
DatabasePathUnavailable,
FileBackedTransient {
path: PathBuf,
},
DatabasePath {
path: PathBuf,
source: Error,
},
InitializationLockOpen {
path: PathBuf,
source: Error,
},
InitializationLockAcquire {
path: PathBuf,
source: Error,
},
WalPragma(Error),
WalNotEnabled {
mode: String,
},
WalBusyNotWal {
mode: String,
},
WalBusyQuery {
wal_error: Box<Error>,
query_error: Box<Error>,
},
Synchronous(Error),
SchemaReadiness(Error),
SchemaNotInitialized {
name: &'static str,
version: i64,
},
NewerSchemaVersion {
name: &'static str,
stored: i64,
supported: i64,
},
Transaction(Error),
Initialize(E),
SchemaMarker(Error),
Commit(Error),
}Expand description
Failure to configure or initialize a Harn-owned SQLite database.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
BusyTimeoutTooLarge
The configured busy timeout cannot be represented by SQLite.
BusyTimeout(Error)
The connection rejected its configured busy timeout.
JournalModeQuery(Error)
The current journal mode could not be observed.
The connection does not own a file-backed main database.
FileBackedTransient
A file-backed connection was passed to the transient initializer.
DatabasePath
The opened database path could not be resolved to one lock identity.
InitializationLockOpen
The persistent sidecar lock could not be opened.
InitializationLockAcquire
Exclusive ownership of the sidecar lock could not be acquired.
WalPragma(Error)
SQLite rejected WAL journal mode for a non-contention reason.
WalNotEnabled
SQLite accepted the journal-mode request but returned another mode.
WalBusyNotWal
WAL promotion was busy and the database remained in another mode.
WalBusyQuery
WAL promotion and the diagnostic journal-mode query both failed.
Synchronous(Error)
The connection rejected the runtime synchronous setting.
SchemaReadiness(Error)
The schema marker could not be inspected.
SchemaNotInitialized
No initializer committed the exact schema version before the readiness lease became available.
NewerSchemaVersion
The database was initialized by a newer incompatible schema owner.
Transaction(Error)
The atomic schema transaction could not begin.
Initialize(E)
The owning schema callback failed.
SchemaMarker(Error)
The schema marker table or row could not be written.
Commit(Error)
The schema and marker transaction could not commit.
Implementations§
Source§impl InitializationError<Error>
impl InitializationError<Error>
Sourcepub fn is_busy_or_locked(&self) -> bool
pub fn is_busy_or_locked(&self) -> bool
Whether the SQLite portion of this failure reports lock contention.
Trait Implementations§
Source§impl<E: Debug> Debug for InitializationError<E>
impl<E: Debug> Debug for InitializationError<E>
Source§impl<E: Display> Display for InitializationError<E>
impl<E: Display> Display for InitializationError<E>
Source§impl<E: Error + 'static> Error for InitializationError<E>
impl<E: Error + 'static> Error for InitializationError<E>
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()