| 182 | type Output = Result<http::Request<Body>, BoxError>; |
| 183 | |
| 184 | fn poll(mut self: Pin<&mut Self>, cx: &mut task::Context<'_>) -> task::Poll<Self::Output> { |
| 185 | task::Poll::Ready(match self.as_mut().project() { |
| 186 | RuntimeApiResponseFutureProj::Future(fut, request_id, _) => match ready!(fut.poll(cx)) { |
| 187 | Ok(ok) => EventCompletionRequest::new(request_id, ok).into_req(), |
| 188 | Err(err) => EventErrorRequest::new(request_id, err).into_req(), |
| 189 | }, |
| 190 | RuntimeApiResponseFutureProj::Ready(ready) => ready.take().expect("future polled after completion"), |
| 191 | }) |
| 192 | } |
| 193 | } |