(&mut self)
| 425 | } |
| 426 | |
| 427 | pub fn close(&mut self) -> PyResult<()> { |
| 428 | if self.is_closed { |
| 429 | return Ok(()); |
| 430 | } |
| 431 | |
| 432 | self.inner = None; |
| 433 | self.inner_state = match self.inner_state { |
| 434 | InnerResponseState::Streaming => InnerResponseState::StreamingClosed, |
| 435 | _ => self.inner_state, |
| 436 | }; |
| 437 | self.is_closed = true; |
| 438 | |
| 439 | Ok(()) |
| 440 | } |
| 441 | |
| 442 | #[getter] |
| 443 | fn content(&mut self, py: Python<'_>) -> PyResult<Vec<u8>> { |
no outgoing calls