Trait reqsign::AwsCredentialLoad

source ·
pub trait AwsCredentialLoad: 'static + Send + Sync {
    // Required method
    fn load_credential<'life0, 'async_trait>(
        &'life0 self,
        client: Client,
    ) -> Pin<Box<dyn Future<Output = Result<Option<Credential>>> + 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_credential<'life0, 'async_trait>( &'life0 self, client: Client, ) -> Pin<Box<dyn Future<Output = Result<Option<Credential>>> + 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§