Struct MapErr
pub struct MapErr<S, F> { /* private fields */ }
Service returned by the map_err combinator.
Implementations
impl<S, F> MapErr<S, F>
const fn new(inner: S, f: F) -> SelfCreates a new
MapErrservice.fn layer(f: F) -> MapErrLayer<F>Returns a new
Layerthat producesMapErrservices.This is a convenience function that simply calls
MapErrLayer::new.
Trait Implementations
impl<S, F> Debug for MapErr<S, F>
where
S: Debug,
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl<S, F, Request, Error> Service<Request> for MapErr<S, F>
where
S: Service<Request>,
F: FnOnce(S::Error) -> Error + Clone,
type Response = <S as Service<Request>>::Response;type Error = Error;type Future = MapErrFuture<<S as Service<Request>>::Future, F>;fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>>fn call(&mut self, request: Request) -> Self::Future
impl<S: Clone, F: Clone> Clone for MapErr<S, F>
fn clone(&self) -> Self