pub enum Error {
Show 13 variants
Database(String),
Rusqlite(Error),
Refinery(Error),
OpenMls(String),
Validation {
field_name: String,
max_size: usize,
actual_size: usize,
},
InvalidKeyLength(usize),
WrongEncryptionKey,
UnencryptedDatabaseWithEncryption,
KeyGeneration(String),
FilePermission(String),
Keyring(String),
KeyringNotInitialized(String),
KeyringEntryMissingForExistingDatabase {
db_path: String,
service_id: String,
db_key_id: String,
},
}Expand description
Error type for SQLite storage operations.
Variants§
Database(String)
SQLite database error
Rusqlite(Error)
Error from rusqlite
Refinery(Error)
Error during database migration
OpenMls(String)
Error from OpenMLS
Validation
Input validation error
Fields
InvalidKeyLength(usize)
Database encryption key has invalid length (expected 32 bytes)
WrongEncryptionKey
Wrong encryption key provided for existing database
UnencryptedDatabaseWithEncryption
Attempted to open an unencrypted database with encryption enabled
KeyGeneration(String)
Failed to generate random key
FilePermission(String)
File permission error
Keyring(String)
Keyring operation failed
KeyringNotInitialized(String)
Keyring store not initialized
The host application must initialize a platform-specific keyring store before using encrypted storage. See the MDK documentation for platform-specific setup instructions.
KeyringEntryMissingForExistingDatabase
Keyring entry missing for existing database
The database file exists but the encryption key is not in the keyring. This can happen if the keyring was cleared, the key was deleted, or the database was copied from another machine. The database cannot be opened without the original encryption key.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
impl !UnwindSafe for Error
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more