Struct tower_pipeline::Pipeline [−][src]
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]
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]
A: Service<R>,
B: Service<A::Response> + Clone,
A::Error: Into<B::Error>,
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.
fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>>
[src]
fn call(&mut self, req: R) -> Self::Future
[src]
Auto Trait Implementations
impl<A, B> RefUnwindSafe for Pipeline<A, B> where
A: RefUnwindSafe,
B: RefUnwindSafe,
[src]
A: RefUnwindSafe,
B: RefUnwindSafe,
impl<A, B> Send for Pipeline<A, B> where
A: Send,
B: Send,
[src]
A: Send,
B: Send,
impl<A, B> Sync for Pipeline<A, B> where
A: Sync,
B: Sync,
[src]
A: Sync,
B: Sync,
impl<A, B> Unpin for Pipeline<A, B> where
A: Unpin,
B: Unpin,
[src]
A: Unpin,
B: Unpin,
impl<A, B> UnwindSafe for Pipeline<A, B> where
A: UnwindSafe,
B: UnwindSafe,
[src]
A: UnwindSafe,
B: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<R, T> PipelineExt<R> for T where
T: Service<R>,
[src]
T: Service<R>,
pub fn pipeline<B>(Self, B) -> Pipeline<T, B> where
B: Service<<T as Service<R>>::Response> + Clone,
T: Service<R>,
<T as Service<R>>::Error: Into<<B as Service<<T as Service<R>>::Response>>::Error>,
[src]
B: Service<<T as Service<R>>::Response> + Clone,
T: Service<R>,
<T as Service<R>>::Error: Into<<B as Service<<T as Service<R>>::Response>>::Error>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,