pub enum StoreError {
CreateDir {
path: PathBuf,
source: Error,
},
Runtime(Error),
Database(Error),
Conflict,
InsideRuntime,
Encode {
family: Family,
message: String,
},
Decode {
family: Family,
source: Error,
},
MalformedKey {
family: Family,
},
SchemaMismatch {
path: PathBuf,
found: u32,
expected: u32,
},
IdentityMismatch {
path: PathBuf,
differences: Vec<IdentityDifference>,
},
IdentityMissing {
path: PathBuf,
},
Wipe {
path: PathBuf,
source: Error,
},
}Expand description
Why a store operation failed.
Variants§
CreateDir
The database directory could not be created.
Runtime(Error)
The runtime that drives the database could not start.
Database(Error)
The database reported an error.
Conflict
Another transaction committed a change to a record this one wrote, so this one changed nothing.
InsideRuntime
The store was called from inside an asynchronous execution context, where waiting for the database would panic, so it did not wait.
Encode
A record could not be encoded.
Decode
A stored record could not be decoded.
MalformedKey
A stored key is not a key of its family.
SchemaMismatch
The database was written with another schema version.
Fields
expected: u32The version this build uses, SCHEMA_VERSION.
IdentityMismatch
The database was stamped with another cache identity: another machine or user created it.
Fields
differences: Vec<IdentityDifference>Each value that differs, stored and current, in the order of the fields of
CacheIdentity.
IdentityMissing
The database has this schema version but no cache identity, so kizz cannot tell which machine and user it belongs to.
Wipe
The database directory could not be removed.
Trait Implementations§
Source§impl Debug for StoreError
impl Debug for StoreError
Source§impl Display for StoreError
impl Display for StoreError
Source§impl Error for StoreError
impl Error for StoreError
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()