Trait aws_smithy_client::retry::NewRequestPolicy
source · [−]pub trait NewRequestPolicy where
Self::Policy: Send + Sync, {
type Policy;
fn new_request_policy(
&self,
sleep_impl: Option<Arc<dyn AsyncSleep>>
) -> Self::Policy;
}
Expand description
A policy instantiator.
Implementors are essentially “policy factories” that can produce a new instance of a retry policy mechanism for each request, which allows both shared global state and per-request local state.
Required Associated Types
Required Methods
fn new_request_policy(
&self,
sleep_impl: Option<Arc<dyn AsyncSleep>>
) -> Self::Policy
fn new_request_policy(
&self,
sleep_impl: Option<Arc<dyn AsyncSleep>>
) -> Self::Policy
Create a new policy mechanism instance.