pub struct SharedCredentialsCache(_);
Expand description
Credentials cache wrapper that may be shared
Newtype wrapper around ProvideCachedCredentials
that implements Clone
using an internal
Arc
.
Implementations§
sourcepub fn new(provider: impl ProvideCachedCredentials + 'static) -> Self
pub fn new(provider: impl ProvideCachedCredentials + 'static) -> Self
Create a new SharedCredentialsCache
from ProvideCachedCredentials
The given cache
will be wrapped in an internal Arc
. If your
cache is already in an Arc
, use SharedCredentialsCache::from(cache)
instead.
Trait Implementations§
source§fn as_ref(&self) -> &(dyn ProvideCachedCredentials + 'static)
fn as_ref(&self) -> &(dyn ProvideCachedCredentials + 'static)
Converts this type into a shared reference of the (usually inferred) input type.
source§fn clone(&self) -> SharedCredentialsCache
fn clone(&self) -> SharedCredentialsCache
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§fn from(cache: Arc<dyn ProvideCachedCredentials>) -> Self
fn from(cache: Arc<dyn ProvideCachedCredentials>) -> Self
Converts to this type from the input type.
source§fn provide_cached_credentials<'a>(&'a self) -> ProvideCredentials<'a> ⓘwhere
Self: 'a,
fn provide_cached_credentials<'a>(&'a self) -> ProvideCredentials<'a> ⓘwhere Self: 'a,
Returns a future that provides cached credentials.