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
sourceimpl Debug for HttpRateLimitRetryPolicy
impl Debug for HttpRateLimitRetryPolicy
sourceimpl Default for HttpRateLimitRetryPolicy
impl Default for HttpRateLimitRetryPolicy
sourcefn default() -> HttpRateLimitRetryPolicy
fn default() -> HttpRateLimitRetryPolicy
Returns the “default value” for a type. Read more
sourceimpl RetryPolicy<ClientError> for HttpRateLimitRetryPolicy
impl RetryPolicy<ClientError> for HttpRateLimitRetryPolicy
sourcefn should_retry(&self, error: &ClientError) -> bool
fn should_retry(&self, error: &ClientError) -> bool
Whether to retry the request based on the given
errorsourcefn 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 RefUnwindSafe for HttpRateLimitRetryPolicy
impl Send for HttpRateLimitRetryPolicy
impl Sync for HttpRateLimitRetryPolicy
impl Unpin for HttpRateLimitRetryPolicy
impl UnwindSafe for HttpRateLimitRetryPolicy
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more