#[non_exhaustive]pub enum Error {
Show 20 variants
Credential {
name: String,
cause: Box<Error>,
},
FileRead {
path: PathBuf,
cause: Box<Error>,
},
InvalidUrl {
url: String,
},
Io(Error),
Json(Error),
MissingEntry {
name: String,
},
MissingKeyInPath {
path: String,
},
MissingKeyInSecret {
secret: String,
key: String,
},
MissingVaultAddr,
MissingVaultToken(Box<Error>),
NoBackend,
NoHomeDirectory,
NonUnicodePath {
path: PathBuf,
},
Parse {
input: String,
},
Other(Box<dyn Error + Send + Sync + 'static>),
Secretfile(Box<Error>),
UndefinedEnvironmentVariable {
name: String,
cause: VarError,
},
UnexpectedHttpStatus {
status: StatusCode,
body: String,
},
UnparseableUrl(UrlError),
Url {
url: Url,
cause: Box<Error>,
},
}
Expand description
An error returned by credentials
.
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.
Credential
Could not access a secure credential.
Fields
This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
FileRead
Could not read file.
Fields
This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
InvalidUrl
We encountered an invalid URL.
Fields
This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
Io(Error)
An error occurred doing I/O.
Json(Error)
We failed to parse JSON data.
MissingEntry
Missing entry in Secretfile.
Fields
This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
MissingKeyInPath
Path is missing a ‘:key’ component.
Fields
This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
MissingKeyInSecret
Secret does not have value for specified key.
Fields
This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
MissingVaultAddr
VAULT_ADDR
not specified.
MissingVaultToken(Box<Error>)
Cannot get either VAULT_TOKEN
or ~/.vault_token
.
NoBackend
No credentials
backend available.
NoHomeDirectory
Can’t find home directory.
NonUnicodePath
Path cannot be represented as Unicode.
Fields
This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
Parse
Parsing error.
Fields
This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
Other(Box<dyn Error + Send + Sync + 'static>)
An unspecified kind of error occurred.
Secretfile(Box<Error>)
Can’t read Secretfile
.
UndefinedEnvironmentVariable
Undefined environment variable.
Fields
This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
UnexpectedHttpStatus
Unexpected HTTP status.
Fields
This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
§
status: StatusCode
The status we received.
UnparseableUrl(UrlError)
We failed to parse a URL.
Url
Could not access URL.
Fields
This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
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)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin 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
Mutably borrows from an owned value. Read more
Source§impl<E> Fail for E
impl<E> Fail for E
Source§fn cause(&self) -> Option<&(dyn Fail + 'static)>
fn cause(&self) -> Option<&(dyn Fail + 'static)>
Returns a reference to the underlying cause of this failure, if it
is an error that wraps other errors. Read more
Source§fn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
Returns a reference to the
Backtrace
carried by this failure, if it
carries one. Read moreSource§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>
Converts
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>
Converts
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