Trait ProvideCredential
pub trait ProvideCredential:
Debug
+ Send
+ Sync
+ Unpin
+ 'static {
type Credential: Send + Sync + Unpin + 'static;
// Required method
fn provide_credential(
&self,
ctx: &Context,
) -> impl Future<Output = Result<Option<Self::Credential>, Error>> + MaybeSend;
}Expand description
Trait for types that can asynchronously supply AwsCredential to a CustomAwsCredentialLoader.
ProvideCredential is the trait used by signer to load the credential from the environment.
`
Service may require different credential to sign the request, for example, AWS require
access key and secret key, while Google Cloud Storage require token.
Required Associated Types§
type Credential: Send + Sync + Unpin + 'static
type Credential: Send + Sync + Unpin + 'static
Credential returned by this loader.
Typically, it will be a credential.
Required Methods§
fn provide_credential(
&self,
ctx: &Context,
) -> impl Future<Output = Result<Option<Self::Credential>, Error>> + MaybeSend
fn provide_credential( &self, ctx: &Context, ) -> impl Future<Output = Result<Option<Self::Credential>, Error>> + MaybeSend
Load signing credential from current env.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.