pub struct MapperService<E> { /* private fields */ }
Expand description
§MapperSerivce
this service stores the Custom errror Type in a field using std::marker::PhantomData
Implementations§
Source§impl<E> MapperService<E>
impl<E> MapperService<E>
pub fn new() -> MapperService<E>
Trait Implementations§
Source§impl<S, B, E> Transform<S, ServiceRequest> for MapperService<E>where
S: Service<ServiceRequest, Response = ServiceResponse<B>, Error = Error> + 'static,
S::Future: 'static,
B: MessageBody,
E: ResponseError + From<Error> + 'static,
impl<S, B, E> Transform<S, ServiceRequest> for MapperService<E>where
S: Service<ServiceRequest, Response = ServiceResponse<B>, Error = Error> + 'static,
S::Future: 'static,
B: MessageBody,
E: ResponseError + From<Error> + 'static,
Source§type Response = <MapperMiddleware<S, E> as Service<ServiceRequest>>::Response
type Response = <MapperMiddleware<S, E> as Service<ServiceRequest>>::Response
Responses produced by the service.
Source§type Future = Ready<Result<<MapperService<E> as Transform<S, ServiceRequest>>::Transform, <MapperService<E> as Transform<S, ServiceRequest>>::InitError>>
type Future = Ready<Result<<MapperService<E> as Transform<S, ServiceRequest>>::Transform, <MapperService<E> as Transform<S, ServiceRequest>>::InitError>>
The future response value.
Source§fn new_transform(&self, service: S) -> Self::Future
fn new_transform(&self, service: S) -> Self::Future
Creates and returns a new Transform component, asynchronously
Auto Trait Implementations§
impl<E> Freeze for MapperService<E>
impl<E> RefUnwindSafe for MapperService<E>where
E: RefUnwindSafe,
impl<E> Send for MapperService<E>where
E: Send,
impl<E> Sync for MapperService<E>where
E: Sync,
impl<E> Unpin for MapperService<E>where
E: Unpin,
impl<E> UnwindSafe for MapperService<E>where
E: UnwindSafe,
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