Struct cipherstash_client::config::credentials::CredentialsProxy
source · pub struct CredentialsProxy<T, C> { /* private fields */ }Expand description
A proxy and cache for a CredentialsProvider that handles refetching when credentials have
expired
Implementations§
source§impl<T, C> CredentialsProxy<T, C>
impl<T, C> CredentialsProxy<T, C>
sourcepub fn new<P: CredentialsProvider<Credentials = C> + 'static, F: Fn(&C) -> T + 'static>(
provider: P,
generate: F
) -> CredentialsProxy<T, C>
pub fn new<P: CredentialsProvider<Credentials = C> + 'static, F: Fn(&C) -> T + 'static>(
provider: P,
generate: F
) -> CredentialsProxy<T, C>
Create a new CredentialsProxy from a provider and a generate function.
sourcepub async fn get(&self) -> Result<Rc<T>, CredentialsError>
pub async fn get(&self) -> Result<Rc<T>, CredentialsError>
Return AWS credentials based on the internal provider
If there are no cached credentials or the credentials are expired, the proxy will use the internal CredentialsProvider to get new ones.
Trait Implementations§
source§impl<T, C> AsyncAccessor for CredentialsProxy<T, C>
impl<T, C> AsyncAccessor for CredentialsProxy<T, C>
Auto Trait Implementations§
impl<T, C> !RefUnwindSafe for CredentialsProxy<T, C>
impl<T, C> !Send for CredentialsProxy<T, C>
impl<T, C> !Sync for CredentialsProxy<T, C>
impl<T, C> Unpin for CredentialsProxy<T, C>
impl<T, C> !UnwindSafe for CredentialsProxy<T, C>
Blanket Implementations§
source§impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
source§fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
Convert the given value into an approximately equivalent representation.
source§impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
§type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
The error type produced by a failed conversion.
source§fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
Convert the subject into an approximately equivalent representation.
source§impl<T, Dst> ConvAsUtil<Dst> for T
impl<T, Dst> ConvAsUtil<Dst> for T
source§fn approx(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst, DefaultApprox>,
fn approx(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst, DefaultApprox>,
Approximate the subject with the default scheme.
source§fn approx_by<Scheme>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst, Scheme>,
Scheme: ApproxScheme,
fn approx_by<Scheme>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst, Scheme>,
Scheme: ApproxScheme,
Approximate the subject with a specific scheme.
source§impl<T> ConvUtil for T
impl<T> ConvUtil for T
source§fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst, DefaultApprox>,
fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst, DefaultApprox>,
Approximate the subject to a given type with the default scheme.
source§fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst, Scheme>,
Scheme: ApproxScheme,
fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst, Scheme>,
Scheme: ApproxScheme,
Approximate the subject to a given type with a specific scheme.
source§fn into_as<Dst>(self) -> Dstwhere
Self: Sized + Into<Dst>,
fn into_as<Dst>(self) -> Dstwhere
Self: Sized + Into<Dst>,
Convert the subject to a given type.
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request