1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use crate::pipeline::{marker::BuildEnclosed, PipelineT};

use super::Service;

impl<F, T, Arg> Service<Arg> for PipelineT<F, T, BuildEnclosed>
where
    F: Service<Arg>,
    T: Service<Result<F::Response, F::Error>>,
{
    type Response = T::Response;
    type Error = T::Error;

    async fn call(&self, arg: Arg) -> Result<Self::Response, Self::Error> {
        let res = self.first.call(arg).await;
        self.second.call(res).await
    }
}