Struct MapFailureClass
pub struct MapFailureClass<C, F> { /* private fields */ }
Response classifier that transforms the failure class of some other classifier.
Created with ClassifyResponse::map_failure_class or
ClassifyEos::map_failure_class.
Trait Implementations
impl<C, F> Debug for MapFailureClass<C, F>
where
C: Debug,
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl<C, F, NewClass> ClassifyEos for MapFailureClass<C, F>
where
C: ClassifyEos,
F: FnOnce(C::FailureClass) -> NewClass,
type FailureClass = NewClass;fn classify_eos(self, trailers: Option<&HeaderMap>) -> Result<(), Self::FailureClass>fn classify_error<E>(self, error: &E) -> Self::FailureClass where E: Display + 'static,
impl<C, F, NewClass> ClassifyResponse for MapFailureClass<C, F>
where
C: ClassifyResponse,
F: FnOnce(C::FailureClass) -> NewClass,
type FailureClass = NewClass;type ClassifyEos = MapFailureClass<<C as ClassifyResponse>::ClassifyEos, F>;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<C: Clone, F: Clone> Clone for MapFailureClass<C, F>
fn clone(&self) -> MapFailureClass<C, F>
impl<C: Copy, F: Copy> Copy for MapFailureClass<C, F>
Auto Trait Implementations
impl<C, F> Freeze for MapFailureClass<C, F>
where
C: Freeze,
F: Freeze,
impl<C, F> RefUnwindSafe for MapFailureClass<C, F>
where
C: RefUnwindSafe,
F: RefUnwindSafe,
impl<C, F> Send for MapFailureClass<C, F>
where
C: Send,
F: Send,
impl<C, F> Sync for MapFailureClass<C, F>
where
C: Sync,
F: Sync,
impl<C, F> Unpin for MapFailureClass<C, F>
where
C: Unpin,
F: Unpin,
impl<C, F> UnsafeUnpin for MapFailureClass<C, F>
where
C: UnsafeUnpin,
F: UnsafeUnpin,
impl<C, F> UnwindSafe for MapFailureClass<C, F>
where
C: UnwindSafe,
F: UnwindSafe,
Blanket Implementations
impl<T> Any for MapFailureClass<C, F>
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for MapFailureClass<C, F>
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for MapFailureClass<C, F>
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> CloneToUninit for MapFailureClass<C, F>
where
T: Clone,
unsafe fn clone_to_uninit(&self, dest: *mut u8)
impl<T> From<T> for MapFailureClass<C, F>
fn from(t: T) -> TReturns the argument unchanged.
impl<T> Instrument for MapFailureClass<C, F>
impl<T> PolicyExt for MapFailureClass<C, F>
where
T: ?Sized,
fn and<P, B, E>(self, other: P) -> And<T, P> where T: Sized + Policy<B, E>, P: Policy<B, E>,fn or<P, B, E>(self, other: P) -> Or<T, P> where T: Sized + Policy<B, E>, P: Policy<B, E>,
impl<T> ToOwned for MapFailureClass<C, F>
where
T: Clone,
type Owned = T;fn to_owned(&self) -> Tfn clone_into(&self, target: &mut T)
impl<T> WithSubscriber for MapFailureClass<C, F>
impl<T, U> Into<U> for MapFailureClass<C, F>
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for MapFailureClass<C, F>
where
U: Into<T>,
type Error = Infallible;fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto<U> for MapFailureClass<C, F>
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>