pub enum MnemoError {
}Expand description
All errors the Mnemo engine can produce.
Variants§
Io(Error)
An underlying I/O failure.
BadMagic
The file does not begin with the Mnemo magic bytes.
UnsupportedVersion(u16)
The on-disk format version is newer than this build understands.
HeaderChecksum
The header page failed its CRC check — a torn page-0 write or
corruption. crate::Mnemo::open tries to repair this from the WAL.
WrongPassphrase
Returned when the supplied passphrase fails to unwrap the data key. The failure is an authenticated-decryption failure, so it is indistinguishable from a tampered key blob — both are rejected cleanly.
PageAuthFailed(u64)
AEAD authentication failed for a page: corruption or tampering.
HeaderTampered
The v7 header seal failed authentication — at least one mutable header field has been rewritten without the DEK. Open refuses to proceed so a silent rollback or pointer-rewrite attack can’t surface stale data.
Crypto(String)
A low-level cryptographic operation failed.
Kdf(String)
Argon2id key derivation failed.
Serialize(String)
A record failed to (de)serialize.
NotFound(String)
No memory exists with the requested ID.
DimensionMismatch
A vector did not match the database’s configured dimensionality.
Fields
Invalid(String)
A caller-supplied argument was invalid.
Trait Implementations§
Source§impl Debug for MnemoError
impl Debug for MnemoError
Source§impl Display for MnemoError
impl Display for MnemoError
Source§impl Error for MnemoError
impl Error for MnemoError
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()