Struct tower_pipeline::Pipeline[][src]

pub struct Pipeline<A, B> { /* fields omitted */ }

Two services combined where the response of the first is the request of the second.

Implementations

impl<A, B> Pipeline<A, B>[src]

pub fn new(first: A, second: B) -> Self[src]

Create a new Pipeline from two Services.

pub fn first_as_ref(&self) -> &A[src]

Get a reference to the first service.

pub fn first_as_mut(&mut self) -> &mut A[src]

Get a mutable reference to the first service.

pub fn into_first(self) -> A[src]

Consume self, returning the first service

pub fn second_as_ref(&self) -> &B[src]

Get a reference to the second service.

pub fn second_as_mut(&mut self) -> &mut B[src]

Get a mutable reference to the second service.

pub fn into_second(self) -> B[src]

Consume self, returning the second service

Trait Implementations

impl<A: Clone, B: Clone> Clone for Pipeline<A, B>[src]

impl<A: Copy, B: Copy> Copy for Pipeline<A, B>[src]

impl<A: Debug, B: Debug> Debug for Pipeline<A, B>[src]

impl<A: Default, B: Default> Default for Pipeline<A, B>[src]

impl<R, A, B> Service<R> for Pipeline<A, B> where
    A: Service<R>,
    B: Service<A::Response> + Clone,
    A::Error: Into<B::Error>, 
[src]

type Response = B::Response

Responses given by the service.

type Error = B::Error

Errors produced by the service.

type Future = ResponseFuture<R, A, B>

The future response value.

Auto Trait Implementations

impl<A, B> RefUnwindSafe for Pipeline<A, B> where
    A: RefUnwindSafe,
    B: RefUnwindSafe
[src]

impl<A, B> Send for Pipeline<A, B> where
    A: Send,
    B: Send
[src]

impl<A, B> Sync for Pipeline<A, B> where
    A: Sync,
    B: Sync
[src]

impl<A, B> Unpin for Pipeline<A, B> where
    A: Unpin,
    B: Unpin
[src]

impl<A, B> UnwindSafe for Pipeline<A, B> where
    A: UnwindSafe,
    B: 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, U> Into<U> for T where
    U: From<T>, 
[src]

impl<R, T> PipelineExt<R> for T where
    T: Service<R>, 
[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.