Struct rusoto_credential::AutoRefreshingProvider [−][src]
pub struct AutoRefreshingProvider<P: ProvideAwsCredentials + 'static> { /* fields omitted */ }
Wrapper for ProvideAwsCredentials
that caches the credentials returned by the
wrapped provider. Each time the credentials are accessed, they are checked to see if
they have expired, in which case they are retrieved from the wrapped provider again.
In order to access the wrapped provider, for instance to set a timeout, the get_ref
and get_mut
methods can be used.
Methods
impl<P: ProvideAwsCredentials + 'static> AutoRefreshingProvider<P>
[src]
impl<P: ProvideAwsCredentials + 'static> AutoRefreshingProvider<P>
pub fn new(provider: P) -> Result<AutoRefreshingProvider<P>, CredentialsError>
[src]
pub fn new(provider: P) -> Result<AutoRefreshingProvider<P>, CredentialsError>
Create a new AutoRefreshingProvider
around the provided base provider.
pub fn get_ref(&self) -> &P
[src]
pub fn get_ref(&self) -> &P
Get a shared reference to the wrapped provider.
pub fn get_mut(&mut self) -> &mut P
[src]
pub fn get_mut(&mut self) -> &mut P
Get a mutable reference to the wrapped provider.
This can be used to call set_timeout
on the wrapped
provider.
Trait Implementations
impl<P: Debug + ProvideAwsCredentials + 'static> Debug for AutoRefreshingProvider<P> where
P::Future: Debug,
[src]
impl<P: Debug + ProvideAwsCredentials + 'static> Debug for AutoRefreshingProvider<P> where
P::Future: Debug,
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<P: ProvideAwsCredentials + 'static> ProvideAwsCredentials for AutoRefreshingProvider<P>
[src]
impl<P: ProvideAwsCredentials + 'static> ProvideAwsCredentials for AutoRefreshingProvider<P>
type Future = AutoRefreshingProviderFuture<P>
The future response value.
fn credentials(&self) -> Self::Future
[src]
fn credentials(&self) -> Self::Future
Produce a new AwsCredentials
future.
Auto Trait Implementations
impl<P> Send for AutoRefreshingProvider<P> where
P: Send,
<P as ProvideAwsCredentials>::Future: Future + Send,
impl<P> Send for AutoRefreshingProvider<P> where
P: Send,
<P as ProvideAwsCredentials>::Future: Future + Send,
impl<P> Sync for AutoRefreshingProvider<P> where
P: Sync,
<P as ProvideAwsCredentials>::Future: Future + Send,
impl<P> Sync for AutoRefreshingProvider<P> where
P: Sync,
<P as ProvideAwsCredentials>::Future: Future + Send,