pub trait ResolveCachedIdentity:
Debug
+ Send
+ Sync {
// Required method
fn resolve_cached_identity<'a>(
&'a self,
resolver: SharedIdentityResolver,
runtime_components: &'a RuntimeComponents,
config_bag: &'a ConfigBag,
) -> IdentityFuture<'a>;
// Provided methods
fn validate_base_client_config(
&self,
runtime_components: &RuntimeComponentsBuilder,
cfg: &ConfigBag,
) -> Result<(), Box<dyn Error + Send + Sync>> { ... }
fn validate_final_config(
&self,
runtime_components: &RuntimeComponents,
cfg: &ConfigBag,
) -> Result<(), Box<dyn Error + Send + Sync>> { ... }
}
Expand description
Caching resolver for identities.
Required Methods§
Sourcefn resolve_cached_identity<'a>(
&'a self,
resolver: SharedIdentityResolver,
runtime_components: &'a RuntimeComponents,
config_bag: &'a ConfigBag,
) -> IdentityFuture<'a>
fn resolve_cached_identity<'a>( &'a self, resolver: SharedIdentityResolver, runtime_components: &'a RuntimeComponents, config_bag: &'a ConfigBag, ) -> IdentityFuture<'a>
Returns a cached identity, or resolves an identity and caches it if its not already cached.
Provided Methods§
Sourcefn validate_base_client_config(
&self,
runtime_components: &RuntimeComponentsBuilder,
cfg: &ConfigBag,
) -> Result<(), Box<dyn Error + Send + Sync>>
fn validate_base_client_config( &self, runtime_components: &RuntimeComponentsBuilder, cfg: &ConfigBag, ) -> Result<(), Box<dyn Error + Send + Sync>>
Validate the base client configuration.
This gets called upon client construction. The full config may not be available at
this time (hence why it has RuntimeComponentsBuilder
as an argument rather
than RuntimeComponents
). Any error returned here will become a panic
in the client constructor.
Sourcefn validate_final_config(
&self,
runtime_components: &RuntimeComponents,
cfg: &ConfigBag,
) -> Result<(), Box<dyn Error + Send + Sync>>
fn validate_final_config( &self, runtime_components: &RuntimeComponents, cfg: &ConfigBag, ) -> Result<(), Box<dyn Error + Send + Sync>>
Validate the final client configuration.
This gets called immediately after the Intercept::read_before_execution
trait hook
when the final configuration has been resolved. Any error returned here will
cause the operation to return that error.