pub struct StandardRetryStrategy { /* private fields */ }
Expand description
Retry strategy with exponential backoff, max attempts, and a token bucket.
Implementations§
Trait Implementations§
Source§impl Debug for StandardRetryStrategy
impl Debug for StandardRetryStrategy
Source§impl Default for StandardRetryStrategy
impl Default for StandardRetryStrategy
Source§fn default() -> StandardRetryStrategy
fn default() -> StandardRetryStrategy
Returns the “default value” for a type. Read more
Source§impl RetryStrategy for StandardRetryStrategy
impl RetryStrategy for StandardRetryStrategy
Source§fn should_attempt_initial_request(
&self,
runtime_components: &RuntimeComponents,
cfg: &ConfigBag,
) -> Result<ShouldAttempt, BoxError>
fn should_attempt_initial_request( &self, runtime_components: &RuntimeComponents, cfg: &ConfigBag, ) -> Result<ShouldAttempt, BoxError>
Decides if the initial attempt should be made.
Source§fn should_attempt_retry(
&self,
ctx: &InterceptorContext,
runtime_components: &RuntimeComponents,
cfg: &ConfigBag,
) -> Result<ShouldAttempt, BoxError>
fn should_attempt_retry( &self, ctx: &InterceptorContext, runtime_components: &RuntimeComponents, cfg: &ConfigBag, ) -> Result<ShouldAttempt, BoxError>
Decides if a retry should be done. Read more
Source§impl Storable for StandardRetryStrategy
impl Storable for StandardRetryStrategy
Source§type Storer = StoreReplace<StandardRetryStrategy>
type Storer = StoreReplace<StandardRetryStrategy>
Specify how an item is stored in the config bag, e.g.
StoreReplace
and StoreAppend
Auto Trait Implementations§
impl !Freeze for StandardRetryStrategy
impl RefUnwindSafe for StandardRetryStrategy
impl Send for StandardRetryStrategy
impl Sync for StandardRetryStrategy
impl Unpin for StandardRetryStrategy
impl UnwindSafe for StandardRetryStrategy
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.