pub struct MapResponseService<S, F> { /* private fields */ }Implementations§
Source§impl<S, F> MapResponseService<S, F>
impl<S, F> MapResponseService<S, F>
pub fn new(inner: S, map_fn: F) -> MapResponseService<S, F>
Trait Implementations§
Source§impl<S, F, Fut, B, ResB> HttpService<B> for MapResponseService<S, F>where
S: HttpService<B>,
F: Fn(Response<<S as HttpService<B>>::ResponseBody>) -> Fut + Sync,
Fut: Future<Output = Response<ResB>> + Send,
B: Send,
impl<S, F, Fut, B, ResB> HttpService<B> for MapResponseService<S, F>where
S: HttpService<B>,
F: Fn(Response<<S as HttpService<B>>::ResponseBody>) -> Fut + Sync,
Fut: Future<Output = Response<ResB>> + Send,
B: Send,
type ResponseBody = ResB
async fn call( &self, request: Request<B>, ) -> Response<<MapResponseService<S, F> as HttpService<B>>::ResponseBody>
Auto Trait Implementations§
impl<S, F> Freeze for MapResponseService<S, F>
impl<S, F> RefUnwindSafe for MapResponseService<S, F>where
S: RefUnwindSafe,
F: RefUnwindSafe,
impl<S, F> Send for MapResponseService<S, F>
impl<S, F> Sync for MapResponseService<S, F>
impl<S, F> Unpin for MapResponseService<S, F>
impl<S, F> UnwindSafe for MapResponseService<S, F>where
S: UnwindSafe,
F: 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