[][src]Enum credentials::Error

#[non_exhaustive]pub enum Error {
    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>,
    },
    // some variants omitted
}

An error returned by credentials.

Variants (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.

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.

Fields of Credential

name: String

The name of the credential we couldn't access.

cause: Box<Error>

The reason why we couldn't access it.

FileRead

Could not read file.

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.

Fields of FileRead

path: PathBuf

The file we couldn't access.

cause: Box<Error>

The reason why we couldn't access it.

InvalidUrl

We encountered an invalid URL.

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.

Fields of InvalidUrl

url: String

The invalid URL.

Io(Error)

An error occurred doing I/O.

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.
Json(Error)

We failed to parse JSON data.

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.
MissingEntry

Missing entry in Secretfile.

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.

Fields of MissingEntry

name: String

The name of the entry.

MissingKeyInPath

Path is missing a ':key' component.

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.

Fields of MissingKeyInPath

path: String

The invalid path.

MissingKeyInSecret

Secret does not have value for specified key.

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.

Fields of MissingKeyInSecret

secret: String

The name of the secret.

key: String

The key for which we have no value.

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.

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.

Fields of NonUnicodePath

path: PathBuf

The path which cannot be represented as Unicode.

Parse

Parsing error.

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.

Fields of Parse

input: String

The input we couldn't parse.

Other(Box<dyn Error + Send + Sync + 'static>)

An unspecified kind of error occurred.

Secretfile(Box<Error>)

Can't read Secretfile.

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.
UndefinedEnvironmentVariable

Undefined environment variable.

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.

Fields of UndefinedEnvironmentVariable

name: String

The name of the environment variable.

cause: VarError

The error we encountered.

UnexpectedHttpStatus

Unexpected HTTP status.

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.

Fields of UnexpectedHttpStatus

status: StatusCode

The status we received.

body: String

The HTTP body we received.

UnparseableUrl(UrlError)

We failed to parse a URL.

Url

Could not access URL.

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.

Fields of Url

url: Url

The URL we couldn't access.

cause: Box<Error>

The reason we couldn't access it.

Trait Implementations

impl Debug for Error[src]

impl Display for Error[src]

impl Error for Error[src]

impl From<Error> for Error[src]

impl From<Error> for Error[src]

impl From<ParseError> for Error[src]

Auto Trait Implementations

impl !RefUnwindSafe for Error

impl Send for Error

impl Sync for Error

impl Unpin for Error

impl !UnwindSafe for Error

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> AsFail for T where
    T: Fail, 

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<E> Fail for E where
    E: 'static + Error + Send + Sync

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Err = <U as TryFrom<T>>::Err