pub struct ThenSvc<S1, S2, Int, Res> { /* private fields */ }
Expand description
Service1(Response) -> Intermediate => Service2(Intermediate) -> Response
Implementations§
Trait Implementations§
Source§impl<S1, S2, Req, Int, Res> Svc<Req> for ThenSvc<S1, S2, Int, Res>
impl<S1, S2, Req, Int, Res> Svc<Req> for ThenSvc<S1, S2, Int, Res>
Source§fn exec(self: Pin<&mut Self>, req: Req) -> Self::Fut
fn exec(self: Pin<&mut Self>, req: Req) -> Self::Fut
Processes request, producing a future that outputs the response type.
Source§fn poll_ready(self: Pin<&mut Self>, cx: Context<'_>) -> Poll<()>
fn poll_ready(self: Pin<&mut Self>, cx: Context<'_>) -> Poll<()>
To be called before
exec
to signal wether the service is ready to process requests.
As such, the check should be inexpensive. Returning Poll::Pending
acts as back-pressure.
The default implementation unconditionally indicates the service is ready.impl<'pin, S1, S2, Int, Res> Unpin for ThenSvc<S1, S2, Int, Res>where
PinnedFieldsOf<__ThenSvc<'pin, S1, S2, Int, Res>>: Unpin,
Auto Trait Implementations§
impl<S1, S2, Int, Res> Freeze for ThenSvc<S1, S2, Int, Res>
impl<S1, S2, Int, Res> RefUnwindSafe for ThenSvc<S1, S2, Int, Res>
impl<S1, S2, Int, Res> Send for ThenSvc<S1, S2, Int, Res>
impl<S1, S2, Int, Res> Sync for ThenSvc<S1, S2, Int, Res>
impl<S1, S2, Int, Res> UnwindSafe for ThenSvc<S1, S2, Int, Res>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more