#[non_exhaustive]pub enum ErrorKind {
Http(Error),
HttpStatus(StatusCode),
CredentialsBuild(Error),
Credentials(CredentialsError),
TonicMetadata(InvalidMetadataValue),
GrpcStatus(Error),
UrlError(InvalidUri),
InvalidApiUrl(String),
HeaderValue(InvalidHeaderValue),
IdTokenNeedsImpersonation(IdTokenUnsupportedCredentials),
InvalidImpersonationUrl(String),
CryptoProviderMissing,
}Expand description
Represents the details of the Error
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Http(Error)
Errors that can possibly occur while accessing an HTTP server.
HttpStatus(StatusCode)
An HTTP status other than 2xx.
CredentialsBuild(Error)
Credentials could not be built: no Application Default Credentials were found, or a credentials file is malformed or of a type the token cannot be minted from.
Credentials(CredentialsError)
Credentials failed to produce a token: a token endpoint refused them or could not be
reached. CredentialsError::is_transient
says whether a retry may succeed.
TonicMetadata(InvalidMetadataValue)
GrpcStatus(Error)
UrlError(InvalidUri)
InvalidApiUrl(String)
An API URL that parses but cannot be connected to: no scheme, a scheme
other than http or https, or no host.
HeaderValue(InvalidHeaderValue)
A header value built from user input (user agent, headers, the token itself) failed HTTP header validation (e.g. contained a control character).
IdTokenNeedsImpersonation(IdTokenUnsupportedCredentials)
The Application Default Credentials hold no service account to mint an ID token
as. An ID token needs a service account to impersonate, given to
GoogleAuthHeaders::id_token_impersonating.
InvalidImpersonationUrl(String)
A service_account_impersonation_url in a credentials file that names no
service account.
CryptoProviderMissing
The Application Default Credentials sign with a private key of their own, such as
a service account key file, and no rustls
CryptoProvider is installed to sign with.
Only reported when the auth-default-crypto feature is off. Install a provider
with CryptoProvider::install_default before building a client, or enable that
feature.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for ErrorKind
impl !UnwindSafe for ErrorKind
impl Freeze for ErrorKind
impl Send for ErrorKind
impl Sync for ErrorKind
impl Unpin for ErrorKind
impl UnsafeUnpin for ErrorKind
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request