Struct MapFuture
pub struct MapFuture<S, F> { /* private fields */ }
Service returned by the map_future combinator.
Implementations
impl<S, F> MapFuture<S, F>
const fn new(inner: S, f: F) -> SelfCreates a new
MapFutureservice.fn layer(f: F) -> MapFutureLayer<F>Returns a new
Layerthat producesMapFutureservices.This is a convenience function that simply calls
MapFutureLayer::new.fn get_ref(&self) -> &SGet a reference to the inner service
fn get_mut(&mut self) -> &mut SGet a mutable reference to the inner service
fn into_inner(self) -> SConsume
self, returning the inner service
Trait Implementations
impl<R, S, F, T, E, Fut> Service<R> for MapFuture<S, F>
where
S: Service<R>,
F: FnMut(S::Future) -> Fut,
E: From<S::Error>,
Fut: Future<Output = Result<T, E>>,
type Response = T;type Error = E;type Future = Fut;fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>>fn call(&mut self, req: R) -> Self::Future
impl<S, F> Debug for MapFuture<S, F>
where
S: Debug,
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl<S: Clone, F: Clone> Clone for MapFuture<S, F>
fn clone(&self) -> Self