pub struct Backoff<'a, R> { /* private fields */ }
Expand description
ExponentialBackoff wraps an HttpRunner and retries requests with an exponential backoff retry mechanism.
Implementations§
Source§impl<R: HttpRunner<Response = HttpResponse>> Backoff<'_, R>
impl<R: HttpRunner<Response = HttpResponse>> Backoff<'_, R>
pub fn retry_on_error<T: Serialize>( &mut self, request: &mut Request<'_, T>, ) -> Result<HttpResponse>
Auto Trait Implementations§
impl<'a, R> Freeze for Backoff<'a, R>
impl<'a, R> !RefUnwindSafe for Backoff<'a, R>
impl<'a, R> !Send for Backoff<'a, R>
impl<'a, R> !Sync for Backoff<'a, R>
impl<'a, R> Unpin for Backoff<'a, R>
impl<'a, R> !UnwindSafe for Backoff<'a, R>
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