pub struct HttpStatusCodeClassifier { /* private fields */ }
Expand description
A retry classifier that will treat HTTP response with those status codes as retryable.
The Default
version will retry 500, 502, 503, and 504 errors.
Implementations§
source§impl HttpStatusCodeClassifier
impl HttpStatusCodeClassifier
sourcepub fn new_from_codes(
retryable_status_codes: impl Into<Cow<'static, [u16]>>,
) -> Self
pub fn new_from_codes( retryable_status_codes: impl Into<Cow<'static, [u16]>>, ) -> Self
Given a Vec<u16>
where the u16
s represent status codes, create a HttpStatusCodeClassifier
that will treat HTTP response with those status codes as retryable. The Default
version
will retry 500, 502, 503, and 504 errors.
sourcepub fn priority() -> RetryClassifierPriority
pub fn priority() -> RetryClassifierPriority
Return the priority of this retry classifier.
Trait Implementations§
source§impl ClassifyRetry for HttpStatusCodeClassifier
impl ClassifyRetry for HttpStatusCodeClassifier
source§fn classify_retry(&self, ctx: &InterceptorContext) -> RetryAction
fn classify_retry(&self, ctx: &InterceptorContext) -> RetryAction
Run this classifier on the
InterceptorContext
to determine if the previous request
should be retried. Returns a RetryAction
.source§fn priority(&self) -> RetryClassifierPriority
fn priority(&self) -> RetryClassifierPriority
The priority of this retry classifier. Read more
source§impl Debug for HttpStatusCodeClassifier
impl Debug for HttpStatusCodeClassifier
Auto Trait Implementations§
impl Freeze for HttpStatusCodeClassifier
impl RefUnwindSafe for HttpStatusCodeClassifier
impl Send for HttpStatusCodeClassifier
impl Sync for HttpStatusCodeClassifier
impl Unpin for HttpStatusCodeClassifier
impl UnwindSafe for HttpStatusCodeClassifier
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
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>
Creates a shared type from an unshared type.