#[non_exhaustive]pub enum HostError {
Locked {
path: PathBuf,
},
Io {
path: PathBuf,
source: Error,
},
NeedsCheckpoint {
path: PathBuf,
},
Engine(Error),
Embed(String),
}Expand description
Every way the host layer can fail. Engine failures pass through as
HostError::Engine; everything filesystem- or network-shaped is
typed here.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Locked
The database file is exclusively locked by another process (or another handle in this process). One file has one owner — open a different file, or drop the other handle.
Io
A filesystem operation failed.
NeedsCheckpoint
A read-only open (crate::Database::open_readonly) found a
non-empty journal. Replaying it would mutate the engine — copying
whole arenas up from the mapped bytes (copy-on-write) — which
defeats the zero-copy intent. Open the database read-write once to
checkpoint it (fold the journal into the snapshot), then retry
Engine(Error)
The engine returned a typed error.
Embed(String)
The embedder transport or response was unusable (the message names what exactly: status, dimension mismatch, malformed JSON).
Trait Implementations§
Source§impl Error for HostError
impl Error for HostError
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()