(mut self: Pin<&mut Self>, cx: &mut TaskContext<'_>)
| 129 | type Output = Result<LambdaResponse, E>; |
| 130 | |
| 131 | fn poll(mut self: Pin<&mut Self>, cx: &mut TaskContext<'_>) -> Poll<Self::Output> { |
| 132 | match *self { |
| 133 | TransformResponse::Request(ref mut origin, ref mut request) => match request.as_mut().poll(cx) { |
| 134 | Poll::Ready(Ok(resp)) => { |
| 135 | *self = TransformResponse::Response(origin.clone(), resp.into_response()); |
| 136 | self.poll(cx) |
| 137 | } |
| 138 | Poll::Ready(Err(err)) => Poll::Ready(Err(err)), |
| 139 | Poll::Pending => Poll::Pending, |
| 140 | }, |
| 141 | TransformResponse::Response(ref mut origin, ref mut response) => match response.as_mut().poll(cx) { |
| 142 | Poll::Ready(resp) => Poll::Ready(Ok(LambdaResponse::from_response(origin, resp))), |
| 143 | Poll::Pending => Poll::Pending, |
| 144 | }, |
| 145 | } |
| 146 | } |
| 147 | } |
| 148 | |
| 149 | /// Wraps a `Service<Request>` in a `Service<LambdaEvent<Request>>` |
nothing calls this directly
no test coverage detected