Trait AwsCredentialLoad

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>, Error>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: 'async_trait;
}
Expand description

Loader trait will try to load credential from different sources.

Required Methods§

fn load_credential<'life0, 'async_trait>( &'life0 self, client: Client, ) -> Pin<Box<dyn Future<Output = Result<Option<Credential>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: '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§

Source§

impl CredentialLoad for CustomAwsCredentialLoader

§

impl CredentialLoad for AssumeRoleLoader

§

impl CredentialLoad for DefaultLoader