(&mut self)
| 22 | } |
| 23 | |
| 24 | pub async fn recv(&mut self) -> Result<Option<ChatResponseStream>, ApiClientError> { |
| 25 | match self { |
| 26 | SendMessageOutput::Codewhisperer(output) => Ok(output |
| 27 | .generate_assistant_response_response |
| 28 | .recv() |
| 29 | .await? |
| 30 | .map(|s| s.into())), |
| 31 | SendMessageOutput::QDeveloper(output) => Ok(output.send_message_response.recv().await?.map(|s| s.into())), |
| 32 | SendMessageOutput::Mock(vec) => Ok(vec.pop()), |
| 33 | } |
| 34 | } |
| 35 | } |
| 36 | |
| 37 | impl RequestId for SendMessageOutput { |