Enum gcp_auth::Error

source ·
pub enum Error {
Show 20 variants NoAuthMethod(Box<Error>, Box<Error>, Box<Error>), TlsError(Error), OAuthConnectionError(Error), CustomServiceAccountPath(Error), CustomServiceAccountCredentials(Error), UserProfilePath(Error), UserProfileFormat(Error), ConnectionError(Error), ParsingError(Error), ServerUnavailable(String), SignerFailed, SignerInit, NoHomeDir, NoProjectId, ProjectIdNotFound, ProjectIdNonUtf8, GCloudNotFound, GCloudError, GCloudParseError, IOError(Error),
}
Expand description

Enumerates all possible errors returned by this library.

Variants§

§

NoAuthMethod(Box<Error>, Box<Error>, Box<Error>)

No available authentication method was discovered

Application can authenticate against GCP using:

  • Default service account - available inside GCP platform using GCP Instance Metadata server
  • GCloud authorized user - retrieved using gcloud auth command

All authentication methods have been tested and none succeeded. Service account file can be downloaded from GCP in json format.

§

TlsError(Error)

Error in underlying RustTLS library. Might signal problem with establishing secure connection using trusted certificates

§

OAuthConnectionError(Error)

Error when establishing connection to OAuth server

§

CustomServiceAccountPath(Error)

Wrong path to custom service account credentials provided

By default, the custom service account credentials are parsed from the path pointed to by the GOOGLE_APPLICATION_CREDENTIALS environment variable.

§

CustomServiceAccountCredentials(Error)

Failed to parse the application credentials provided

By default, the custom service account credentials are parsed from the path pointed to by the GOOGLE_APPLICATION_CREDENTIALS environment variable.

§

UserProfilePath(Error)

Default user profile not found

User can authenticate locally during development using gcloud auth login which results in creating ~/.config/gcloud/application_default_credentials.json which couldn’t be find on the machine

§

UserProfileFormat(Error)

Wrong format of user profile

§

ConnectionError(Error)

Could not connect to server

§

ParsingError(Error)

Could not parse response from server

§

ServerUnavailable(String)

Could not connect to server

§

SignerFailed

Could not sign requested message

§

SignerInit

Could not initialize signer

§

NoHomeDir

Could not find Home directory in the environment

§

NoProjectId

Project ID not supported for current authentication method

§

ProjectIdNotFound

Project ID not found through current authentication method

§

ProjectIdNonUtf8

Project ID is invalid UTF-8

§

GCloudNotFound

GCloud executable not found

§

GCloudError

GCloud returned an error status

§

GCloudParseError

GCloud output couldn’t be parsed

§

IOError(Error)

Represents all other cases of std::io::Error.

Trait Implementations§

Formats the value using the given formatter. Read more
Formats the value using the given formatter. Read more
The lower-level source of this error, if any. Read more
👎Deprecated since 1.42.0: use the Display impl or to_string()
👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

🔬This is a nightly-only experimental API. (provide_any)
Data providers should implement this method to provide all values they are able to provide by using demand. Read more
Converts the given value to a String. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more