pub enum StoreError {
Engine(String),
ValueCodec(String),
KeyDecode(String),
Cold,
Crypto(String),
CollectionNotFound(String),
ReservedName(String),
SchemaTooNew {
found: u32,
supported: u32,
},
Schema(String),
}Variants§
Engine(String)
A failure originating in the underlying storage engine (redb I/O, a transaction/commit failure, a poisoned in-memory lock). The string is the engine’s own message, preserved for diagnostics.
ValueCodec(String)
A value failed to (de)serialize through the postcard codec. A decode
failure here means stored bytes don’t match the caller’s value type —
either a schema mismatch or corruption.
KeyDecode(String)
A key failed to decode from its order-preserving byte encoding. Indicates
a malformed key on disk or a key/type mismatch at a Table<K, V> callsite.
Cold
The vault is locked, so no key material is available for the AEAD value
boundary. Surfaced from crate::crypto::CryptoError::Cold; callers treat
it as “unlock required”, not data loss.
Crypto(String)
An AEAD operation failed — corrupt ciphertext, a wrong key, or a row/DEK
presented at the wrong location (AAD mismatch). Carries the underlying
crate::crypto::CryptoError message.
CollectionNotFound(String)
A collection was opened that has no DEK wrapping yet (use the create-or-open path to provision one).
ReservedName(String)
A collection name collides with a reserved table (the _-prefixed names
the store uses internally, e.g. _dek_wrappings, _meta).
SchemaTooNew
The on-disk store format is newer than this software supports. The store refuses to open rather than risk misreading a future format — the “never silently open a newer format” rule.
Schema(String)
A schema/migration problem — e.g. an older store with no registered migration to bring it to the current format version.
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
1.30.0 · 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()