Struct ServerErrorsAsFailures

pub struct ServerErrorsAsFailures { /* private fields */ }

The default classifier used for normal HTTP responses.

Responses with a 5xx status code are considered failures, all others are considered successes.

Implementations

impl ServerErrorsAsFailures

fn new() -> Self

Create a new ServerErrorsAsFailures.

fn make_classifier() -> SharedClassifier<Self>

Returns a MakeClassifier that produces ServerErrorsAsFailures.

This is a convenience function that simply calls SharedClassifier::new.

Trait Implementations

impl ClassifyResponse for ServerErrorsAsFailures

type FailureClass = ServerErrorsFailureClass;
type ClassifyEos = NeverClassifyEos<ServerErrorsFailureClass>;
fn classify_response<B>(self, res: &Response<B>) -> ClassifiedResponse<Self::FailureClass, Self::ClassifyEos>
fn classify_error<E>(self, error: &E) -> Self::FailureClass
where
    E: Display + 'static,

impl Clone for ServerErrorsAsFailures

fn clone(&self) -> Self

impl Debug for ServerErrorsAsFailures

fn fmt(&self, f: &mut Formatter<'_>) -> Result

impl Default for ServerErrorsAsFailures

fn default() -> Self

Auto Trait Implementations

impl Freeze for ServerErrorsAsFailures

impl RefUnwindSafe for ServerErrorsAsFailures

impl Send for ServerErrorsAsFailures

impl Sync for ServerErrorsAsFailures

impl Unpin for ServerErrorsAsFailures

impl UnsafeUnpin for ServerErrorsAsFailures

impl UnwindSafe for ServerErrorsAsFailures

Blanket Implementations

impl<T> Any for ServerErrorsAsFailures where T: 'static + ?Sized,

impl<T> Borrow<T> for ServerErrorsAsFailures where T: ?Sized,

impl<T> BorrowMut<T> for ServerErrorsAsFailures where T: ?Sized,

impl<T> CloneToUninit for ServerErrorsAsFailures where T: Clone,

impl<T> From<T> for ServerErrorsAsFailures

impl<T> Instrument for ServerErrorsAsFailures

impl<T> PolicyExt for ServerErrorsAsFailures where T: ?Sized,

impl<T> ToOwned for ServerErrorsAsFailures where T: Clone,

impl<T> WithSubscriber for ServerErrorsAsFailures

impl<T, U> Into<U> for ServerErrorsAsFailures where U: From<T>,

impl<T, U> TryFrom<U> for ServerErrorsAsFailures where U: Into<T>,

impl<T, U> TryInto<U> for ServerErrorsAsFailures where U: TryFrom<T>,