pub type DefaultHttpRetryPolicy<B = ()> = RollingExponentialBackoffRetryPolicy<StandardHttpClassifier<B>, StandardHttpRetryLifecycle>;Expand description
A batteries-included retry policy suitable for HTTP-based clients.
Aliased Type§
pub struct DefaultHttpRetryPolicy<B = ()> { /* private fields */ }Implementations§
Source§impl<B: 'static> DefaultHttpRetryPolicy<B>
impl<B: 'static> DefaultHttpRetryPolicy<B>
Sourcepub fn with_backoff(backoff: ExponentialBackoff) -> Self
pub fn with_backoff(backoff: ExponentialBackoff) -> Self
Creates a new retry policy adapted to HTTP-based clients with the given exponential backoff strategy.
This policy uses the standard HTTP classifier (StandardHttpClassifier) and retry lifecycle (StandardHttpRetryLifecycle).
Sourcepub fn with_backoff_and_classifier(
backoff: ExponentialBackoff,
classifier: StandardHttpClassifier<B>,
) -> Self
pub fn with_backoff_and_classifier( backoff: ExponentialBackoff, classifier: StandardHttpClassifier<B>, ) -> Self
Creates a new retry policy adapted to HTTP-based clients with the given exponential backoff strategy and a
pre-built StandardHttpClassifier.
This is the same as DefaultHttpRetryPolicy::with_backoff, but allows the caller to supply a classifier that
has been customized (for example, with additional HttpRetryPredicates via
StandardHttpClassifier::with_predicate).