pub trait GoogleTokenLoad:
'static
+ Send
+ Sync
+ Debug {
// Required method
fn load<'life0, 'async_trait>(
&'life0 self,
client: Client,
) -> Pin<Box<dyn Future<Output = Result<Option<Token>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Loader trait will try to load credential from different sources.
Required Methods§
Sourcefn load<'life0, 'async_trait>(
&'life0 self,
client: Client,
) -> Pin<Box<dyn Future<Output = Result<Option<Token>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn load<'life0, 'async_trait>(
&'life0 self,
client: Client,
) -> Pin<Box<dyn Future<Output = Result<Option<Token>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Load credential from sources.
- If succeed, return
Ok(Some(cred)) - If not found, return
Ok(None) - If unexpected errors happened, return
Err(err)
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".