Struct actix_net::service::MapErrNewService
source · pub struct MapErrNewService<A, F, E> { /* private fields */ }
Expand description
NewService for the map_err
combinator, changing the type of a new
service’s error.
This is created by the NewServiceExt::map_err
method.
Implementations§
source§impl<A, F, E> MapErrNewService<A, F, E>where
A: NewService,
F: Fn(A::Error) -> E,
impl<A, F, E> MapErrNewService<A, F, E>where
A: NewService,
F: Fn(A::Error) -> E,
Trait Implementations§
source§impl<A, F, E> Clone for MapErrNewService<A, F, E>where
A: NewService + Clone,
F: Fn(A::Error) -> E + Clone,
impl<A, F, E> Clone for MapErrNewService<A, F, E>where
A: NewService + Clone,
F: Fn(A::Error) -> E + Clone,
source§impl<A, F, E> NewService for MapErrNewService<A, F, E>where
A: NewService,
F: Fn(A::Error) -> E + Clone,
impl<A, F, E> NewService for MapErrNewService<A, F, E>where
A: NewService,
F: Fn(A::Error) -> E + Clone,
§type Request = <A as NewService>::Request
type Request = <A as NewService>::Request
Requests handled by the service
§type Response = <A as NewService>::Response
type Response = <A as NewService>::Response
Responses given by the service
§type Service = MapErr<<A as NewService>::Service, F, E>
type Service = MapErr<<A as NewService>::Service, F, E>
The
Service
value created by this factory§type InitError = <A as NewService>::InitError
type InitError = <A as NewService>::InitError
Errors produced while building a service.
source§fn new_service(&self) -> Self::Future
fn new_service(&self) -> Self::Future
Create and return a new service value asynchronously.
Auto Trait Implementations§
impl<A, F, E> RefUnwindSafe for MapErrNewService<A, F, E>where
A: RefUnwindSafe,
E: RefUnwindSafe,
F: RefUnwindSafe,
impl<A, F, E> Send for MapErrNewService<A, F, E>where
A: Send,
E: Send,
F: Send,
impl<A, F, E> Sync for MapErrNewService<A, F, E>where
A: Sync,
E: Sync,
F: Sync,
impl<A, F, E> Unpin for MapErrNewService<A, F, E>where
A: Unpin,
E: Unpin,
F: Unpin,
impl<A, F, E> UnwindSafe for MapErrNewService<A, F, E>where
A: UnwindSafe,
E: UnwindSafe,
F: UnwindSafe,
Blanket Implementations§
source§impl<T> IntoNewService<T> for Twhere
T: NewService,
impl<T> IntoNewService<T> for Twhere
T: NewService,
source§fn into_new_service(self) -> T
fn into_new_service(self) -> T
Convert to an
NewService
source§impl<T> NewServiceExt for Twhere
T: NewService + ?Sized,
impl<T> NewServiceExt for Twhere
T: NewService + ?Sized,
fn apply<S, I, F, R>(
self,
service: I,
f: F
) -> AndThenNewService<Self, ApplyNewService<S, F, R, Self::Response>>where
Self: Sized,
S: NewService<InitError = Self::InitError>,
S::Error: Into<<R::Future as Future>::Error>,
I: IntoNewService<S>,
F: Fn(Self::Response, &mut S::Service) -> R + Clone,
R: IntoFuture<Error = Self::Error>,
fn and_then<F, B>(self, new_service: F) -> AndThenNewService<Self, B>where
Self: Sized,
F: IntoNewService<B>,
B: NewService<Request = Self::Response, Error = Self::Error, InitError = Self::InitError>,
source§fn from_err<E>(self) -> FromErrNewService<Self, E>where
Self: Sized,
E: From<Self::Error>,
fn from_err<E>(self) -> FromErrNewService<Self, E>where
Self: Sized,
E: From<Self::Error>,
NewService
that create service to map this service’s error
and new service’s init error to any error
implementing From
for this services
Error`. Read moresource§fn then<F, B>(self, new_service: F) -> ThenNewService<Self, B>where
Self: Sized,
F: IntoNewService<B>,
B: NewService<Request = Result<Self::Response, Self::Error>, Error = Self::Error, InitError = Self::InitError>,
fn then<F, B>(self, new_service: F) -> ThenNewService<Self, B>where
Self: Sized,
F: IntoNewService<B>,
B: NewService<Request = Result<Self::Response, Self::Error>, Error = Self::Error, InitError = Self::InitError>,
Create
NewService
to chain on a computation for when a call to the
service finished, passing the result of the call to the next
service B
. Read more