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§

source

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)

Implementors§