pub struct AccessTokenCredentials { /* private fields */ }Expand description
An implementation of crate::credentials::CredentialsProvider that can also provide direct access to the underlying access token.
This struct is returned by the build_access_token_credentials() method on
the various credential builders. It can be used to obtain an access token
directly via the access_token() method, or it can be converted into a Credentials
object to be used with the Google Cloud client libraries.
Implementations§
Source§impl AccessTokenCredentials
impl AccessTokenCredentials
pub async fn access_token(&self) -> Result<AccessToken, CredentialsError>
Trait Implementations§
Source§impl Clone for AccessTokenCredentials
impl Clone for AccessTokenCredentials
Source§fn clone(&self) -> AccessTokenCredentials
fn clone(&self) -> AccessTokenCredentials
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl CredentialsProvider for AccessTokenCredentials
Makes AccessTokenCredentials compatible with clients that expect
a Credentials and/or a CredentialsProvider.
impl CredentialsProvider for AccessTokenCredentials
Makes AccessTokenCredentials compatible with clients that expect a Credentials and/or a CredentialsProvider.
Source§async fn headers(
&self,
extensions: Extensions,
) -> Result<CacheableResource<HeaderMap>, CredentialsError>
async fn headers( &self, extensions: Extensions, ) -> Result<CacheableResource<HeaderMap>, CredentialsError>
Asynchronously constructs the auth headers. Read more
Source§async fn universe_domain(&self) -> Option<String>
async fn universe_domain(&self) -> Option<String>
Retrieves the universe domain associated with the credentials, if any.
Source§impl Debug for AccessTokenCredentials
impl Debug for AccessTokenCredentials
Source§impl<T> From<T> for AccessTokenCredentials
impl<T> From<T> for AccessTokenCredentials
Auto Trait Implementations§
impl Freeze for AccessTokenCredentials
impl !RefUnwindSafe for AccessTokenCredentials
impl Send for AccessTokenCredentials
impl Sync for AccessTokenCredentials
impl Unpin for AccessTokenCredentials
impl !UnwindSafe for AccessTokenCredentials
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