#[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
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
DirectoryAlreadyExists
Directory already exists
FailedCreatingDirectory
Failed creating the CryptoBox
directory
RootKeyEncryption
Failed to encrypt root key
Fields
§
source: BackendError
The underlying error
RootKeyDecryption
Failed to decrypt root key. Most likely this is an incorrect password.
Fields
§
source: BackendError
The 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: BackendError
The underlying error
NoSuchNamespace
No such namespace
Fetch
Error retrieving item
Fields
§
source: BackendError
Underlying failure
Store
Error storing item
Fields
§
source: BackendError
Underlying 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
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§fn cause(&self) -> Option<&dyn Error>
fn cause(&self) -> Option<&dyn Error>
👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§impl ErrorCompat for CryptoBoxError
impl ErrorCompat for CryptoBoxError
Auto Trait Implementations§
impl Freeze for CryptoBoxError
impl !RefUnwindSafe for CryptoBoxError
impl Send for CryptoBoxError
impl Sync for CryptoBoxError
impl Unpin for CryptoBoxError
impl !UnwindSafe for CryptoBoxError
Blanket Implementations§
Source§impl<T> AsErrorSource for Twhere
T: Error + 'static,
impl<T> AsErrorSource for Twhere
T: Error + 'static,
Source§fn as_error_source(&self) -> &(dyn Error + 'static)
fn as_error_source(&self) -> &(dyn Error + 'static)
For maximum effectiveness, this needs to be called as a method
to benefit from Rust’s automatic dereferencing of method
receivers.
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
Mutably borrows from an owned value. Read more