Struct tower::util::MapFuture[][src]

pub struct MapFuture<S, F> { /* fields omitted */ }
This is supported on crate feature util only.

Service returned by the map_future combinator.

Implementations

impl<S, F> MapFuture<S, F>[src]

pub fn new(inner: S, f: F) -> Self[src]

Creates a new MapFuture service.

pub fn layer(f: F) -> MapFutureLayer<F>[src]

Returns a new Layer that produces MapFuture services.

This is a convenience function that simply calls MapFutureLayer::new.

pub fn get_ref(&self) -> &S[src]

Get a reference to the inner service

pub fn get_mut(&mut self) -> &mut S[src]

Get a mutable reference to the inner service

pub fn into_inner(self) -> S[src]

Consume self, returning the inner service

Trait Implementations

impl<S: Clone, F: Clone> Clone for MapFuture<S, F>[src]

impl<S, F> Debug for MapFuture<S, F> where
    S: Debug
[src]

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>>, 
[src]

type Response = T

Responses given by the service.

type Error = E

Errors produced by the service.

type Future = Fut

The future response value.

Auto Trait Implementations

impl<S, F> RefUnwindSafe for MapFuture<S, F> where
    F: RefUnwindSafe,
    S: RefUnwindSafe
[src]

impl<S, F> Send for MapFuture<S, F> where
    F: Send,
    S: Send
[src]

impl<S, F> Sync for MapFuture<S, F> where
    F: Sync,
    S: Sync
[src]

impl<S, F> Unpin for MapFuture<S, F> where
    F: Unpin,
    S: Unpin
[src]

impl<S, F> UnwindSafe for MapFuture<S, F> where
    F: UnwindSafe,
    S: UnwindSafe
[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, Request> ServiceExt<Request> for T where
    T: Service<Request> + ?Sized
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,