pub struct HttpRateLimitRetryPolicy;Expand description
Implements RetryPolicy that will retry requests that errored with status code 429 i.e. TOO_MANY_REQUESTS
Infura often fails with a "header not found" rpc error which is apparently linked to load
balancing, which are retried as well.
Trait Implementations§
Source§impl Debug for HttpRateLimitRetryPolicy
impl Debug for HttpRateLimitRetryPolicy
Source§impl Default for HttpRateLimitRetryPolicy
impl Default for HttpRateLimitRetryPolicy
Source§fn default() -> HttpRateLimitRetryPolicy
fn default() -> HttpRateLimitRetryPolicy
Returns the “default value” for a type. Read more
Source§impl RetryPolicy<ClientError> for HttpRateLimitRetryPolicy
impl RetryPolicy<ClientError> for HttpRateLimitRetryPolicy
Source§fn should_retry(&self, error: &ClientError) -> bool
fn should_retry(&self, error: &ClientError) -> bool
Whether to retry the request based on the given
errorSource§fn backoff_hint(&self, error: &ClientError) -> Option<Duration>
fn backoff_hint(&self, error: &ClientError) -> Option<Duration>
Providers may include the
backoff in the error response directlyAuto Trait Implementations§
impl Freeze for HttpRateLimitRetryPolicy
impl RefUnwindSafe for HttpRateLimitRetryPolicy
impl Send for HttpRateLimitRetryPolicy
impl Sync for HttpRateLimitRetryPolicy
impl Unpin for HttpRateLimitRetryPolicy
impl UnwindSafe for HttpRateLimitRetryPolicy
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 more