(self: Pin<&mut Self>, cx: &mut Context<'_>)
| 150 | impl futures_lite::stream::Stream for AsyncInputChunkStream { |
| 151 | type Item = Result<Vec<u8>, std::io::Error>; |
| 152 | fn poll_next(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Option<Self::Item>> { |
| 153 | match self.stream.poll_ready(cx) { |
| 154 | Poll::Pending => Poll::Pending, |
| 155 | Poll::Ready(()) => match self.stream.stream.read(self.chunk_size as u64) { |
| 156 | Ok(r) if r.is_empty() => Poll::Pending, |
| 157 | Ok(r) => Poll::Ready(Some(Ok(r))), |
| 158 | Err(StreamError::LastOperationFailed(err)) => { |
| 159 | Poll::Ready(Some(Err(std::io::Error::other(err.to_debug_string())))) |
| 160 | } |
| 161 | Err(StreamError::Closed) => Poll::Ready(None), |
| 162 | }, |
| 163 | } |
| 164 | } |
| 165 | } |
| 166 | |
| 167 | pin_project_lite::pin_project! { |
nothing calls this directly
no test coverage detected