aws_sdk_kms::config

Trait ProvideCredentials

Source
pub trait ProvideCredentials:
    Send
    + Sync
    + Debug {
    // Required method
    fn provide_credentials<'a>(&'a self) -> ProvideCredentials<'a>
       where Self: 'a;

    // Provided method
    fn fallback_on_interrupt(&self) -> Option<Credentials> { ... }
}
Expand description

Asynchronous Credentials Provider

Required Methods§

Source

fn provide_credentials<'a>(&'a self) -> ProvideCredentials<'a>
where Self: 'a,

Returns a future that provides credentials.

Provided Methods§

Source

fn fallback_on_interrupt(&self) -> Option<Credentials>

Returns fallback credentials.

This method should be used as a fallback plan, i.e., when a call to provide_credentials is interrupted and its future fails to complete.

The fallback credentials should be set aside and ready to be returned immediately. Therefore, the user should NOT go fetch new credentials within this method, which might cause a long-running operation.

Trait Implementations§

Source§

impl AsRef<dyn ProvideCredentials> for SharedCredentialsProvider

Source§

fn as_ref(&self) -> &(dyn ProvideCredentials + 'static)

Converts this type into a shared reference of the (usually inferred) input type.

Implementations on Foreign Types§

Source§

impl ProvideCredentials for Arc<dyn ProvideCredentials>

Implementors§