Enum encrypt_config::ConfigError
source · pub enum ConfigError {
ConfigNotFound {
key: String,
},
SerdeError {
source: Error,
},
LoadEncrypterFailed {
source: Error,
},
KeyringError {
source: Error,
},
EncryptionError {
source: Error,
},
IoError {
source: Error,
},
CollectFailed,
}Expand description
The Error types of encrypt config, which is implemented by snafu.
Variants§
ConfigNotFound
This error will be returned when the key is not found in the config.
SerdeError
This error will be returned when the value cannot seriliazed or deserialized.
LoadEncrypterFailed
Available on crate feature
secret only.This error will be returned when the encrypter cannot be deserialized from keyring password. This may caused by the private key stored in keyring being incorrect, modified or recreated.
KeyringError
Available on crate feature
secret only.This error will be returned when the OS’ secret manager cannot be accessed.
EncryptionError
Available on crate feature
secret only.This error will be returned when the encryption or decryption failed.
IoError
This error will be returned when the config cannot be saved to or read from the file.
CollectFailed
This error will be returned when the config cannot be collected from the source or the default value.
Trait Implementations§
source§impl Debug for ConfigError
impl Debug for ConfigError
source§impl Display for ConfigError
impl Display for ConfigError
source§impl Error for ConfigError
impl Error for ConfigError
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 ConfigError
impl ErrorCompat for ConfigError
source§fn iter_chain(&self) -> ChainCompat<'_>where
Self: AsErrorSource,
fn iter_chain(&self) -> ChainCompat<'_>where
Self: AsErrorSource,
Returns an iterator for traversing the chain of errors,
starting with the current error
and continuing with recursive calls to
Error::source. Read moresource§impl From<Error> for ConfigError
impl From<Error> for ConfigError
source§impl From<Error> for ConfigError
impl From<Error> for ConfigError
source§impl From<Error> for ConfigError
impl From<Error> for ConfigError
Auto Trait Implementations§
impl !RefUnwindSafe for ConfigError
impl Send for ConfigError
impl Sync for ConfigError
impl Unpin for ConfigError
impl !UnwindSafe for ConfigError
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