[−][src]Trait adventure::retry::RetriableRequest
A request able to decide to send itself again if the previous attempt has failed.
Required methods
fn should_retry(&self, error: &Self::Error, next_interval: Duration) -> bool
Provided methods
fn retry(self) -> RetryingTokio<Self> where
Self: Sized,
Self: Sized,
Wrap this request to retry itself on failure, with a default ExponentialBackoff
strategy.
It should be called within the tokio execution context,
because the default timer is implemented using tokio_timer
.
fn retry_with_backoff<B>(self, backoff: B) -> RetryingTokio<Self, B> where
Self: BaseRequest + Sized,
B: Backoff,
Self: BaseRequest + Sized,
B: Backoff,
Wrap this request to retry itself on failure, with a given backoff strategy.
It should be called within the tokio execution context,
because the default timer is implemented using tokio_timer
.
Implementations on Foreign Types
impl<'_, R> RetriableRequest for &'_ R where
R: RetriableRequest,
[src]
R: RetriableRequest,
fn should_retry(&self, error: &Self::Error, next_interval: Duration) -> bool
[src]
impl<P> RetriableRequest for Pin<P> where
P: Deref,
<P as Deref>::Target: RetriableRequest,
[src]
P: Deref,
<P as Deref>::Target: RetriableRequest,
fn should_retry(&self, error: &Self::Error, next_interval: Duration) -> bool
[src]
impl<R> RetriableRequest for Box<R> where
R: RetriableRequest,
[src]
R: RetriableRequest,
fn should_retry(&self, error: &Self::Error, next_interval: Duration) -> bool
[src]
Implementors
impl<R> RetriableRequest for Oneshot<R> where
R: RetriableRequest,
[src]
R: RetriableRequest,
fn should_retry(&self, error: &Self::Error, next_interval: Duration) -> bool
[src]
impl<R> RetriableRequest for Repeat<R> where
R: RetriableRequest,
[src]
R: RetriableRequest,