#[non_exhaustive]pub enum CryptoBoxError {
Show 16 variants
DirectoryAlreadyExists {
directory: String,
},
FailedCreatingDirectory {
directory: String,
source: Error,
},
RootKeyEncryption {
source: BackendError,
},
RootKeyDecryption {
source: BackendError,
},
RootKeyIO {
path: String,
source: Error,
},
RootKeySerial {
source: Error,
},
RootNamespaceInit {
path: String,
source: BackendError,
},
RootNamespaceOpen {
path: String,
source: BackendError,
},
DirectoryDoesNotExist {
path: String,
},
MissingNamespaceDirectory,
MissingConfiguration,
NamespaceOpen {
name: String,
source: BackendError,
},
NoSuchNamespace {
name: String,
},
Fetch {
source: BackendError,
},
Store {
source: BackendError,
},
Flush {
sources: Vec<(Option<String>, BackendError)>,
},
}Expand description
Errors that can be returned when interacting with a CryptoBox
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
DirectoryAlreadyExists
Directory already exists
FailedCreatingDirectory
Failed creating the CryptoBox directory
RootKeyEncryption
Failed to encrypt root key
Fields
source: BackendErrorThe underlying error
RootKeyDecryption
Failed to decrypt root key. Most likely this is an incorrect password.
Fields
source: BackendErrorThe underlying error
RootKeyIO
Failed to write root key file
RootKeySerial
RootKey serialization error
RootNamespaceInit
Failed to initialize the root namespace
RootNamespaceOpen
Failed to open root namespace
DirectoryDoesNotExist
Path does not exist or is not a directory
MissingNamespaceDirectory
Missing namespace directory
MissingConfiguration
CryptoBox is missing the configuration entry
NamespaceOpen
Failed to open a namespace
Fields
source: BackendErrorThe underlying error
NoSuchNamespace
No such namespace
Fetch
Error retrieving item
Fields
source: BackendErrorUnderlying failure
Store
Error storing item
Fields
source: BackendErrorUnderlying failure
Flush
An error occurred while flushing the CryptoBox
Fields
sources: Vec<(Option<String>, BackendError)>Underlying failures
Trait Implementations§
Source§impl Debug for CryptoBoxError
impl Debug for CryptoBoxError
Source§impl Display for CryptoBoxError
impl Display for CryptoBoxError
Source§impl Error for CryptoBoxError
impl Error for CryptoBoxError
Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§fn cause(&self) -> Option<&dyn Error>
fn cause(&self) -> Option<&dyn Error>
replaced by Error::source, which can support downcasting