pub struct MapperService<E> { /* private fields */ }
Expand description
MapperSerivce
this service stores the Custom errror Type in a field using std::marker::PhantomData
Implementations
sourceimpl<E> MapperService<E>
impl<E> MapperService<E>
pub fn new() -> MapperService<E>
Trait Implementations
sourceimpl<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,
type Response = <MapperMiddleware<S, E> as Service<ServiceRequest>>::Response
type Response = <MapperMiddleware<S, E> as Service<ServiceRequest>>::Response
Responses produced by the service.
type Transform = MapperMiddleware<S, E>
type Transform = MapperMiddleware<S, E>
The TransformService
value created by this factory
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.
sourcefn 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> 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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more