Struct hedwig::googlepubsub::retry_policy::exponential_backoff::ExponentialBackoff [−][src]
pub struct ExponentialBackoff<R, S = TokioSleeper> { /* fields omitted */ }
google
only.Expand description
A RetryPolicy
which delays repeated retries by an increasing amount of time with each
attempt.
Implementations
Create a new backoff policy which will produce retry intervals for errors that satisfy the
given RetryPredicate
This uses the default Sleeper
implementation, which might be unavailable depending on
the crate’s enabled features. ExponentialBackoff::with_sleeper
can be used to specify
the sleeper instead of using the default
Create a new backoff policy which will produce retry intervals for errors that satisfy the
given RetryPredicate
, and uses the given Sleeper
to produce the interval futures.
Trait Implementations
impl<T, E, R, S> RetryPolicy<T, E> for ExponentialBackoff<R, S> where
R: RetryPredicate<E> + Clone,
S: Sleeper + Clone,
E: Debug,
T: ?Sized,
impl<T, E, R, S> RetryPolicy<T, E> for ExponentialBackoff<R, S> where
R: RetryPredicate<E> + Clone,
S: Sleeper + Clone,
E: Debug,
T: ?Sized,
type RetryOp = ExponentialRetry<R, S>
type RetryOp = ExponentialRetry<R, S>
The RetryOperation
returned by new_operation
Prepare to retry some operation. Read more
Auto Trait Implementations
impl<R, S> RefUnwindSafe for ExponentialBackoff<R, S> where
R: RefUnwindSafe,
S: RefUnwindSafe,
impl<R, S> Send for ExponentialBackoff<R, S> where
R: Send,
S: Send,
impl<R, S> Sync for ExponentialBackoff<R, S> where
R: Sync,
S: Sync,
impl<R, S> Unpin for ExponentialBackoff<R, S> where
R: Unpin,
S: Unpin,
impl<R, S> UnwindSafe for ExponentialBackoff<R, S> where
R: UnwindSafe,
S: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
Wrap the input message T
in a tonic::Request
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more