Await for read readiness.
(&self)
| 44 | } |
| 45 | /// Await for read readiness. |
| 46 | async fn ready(&self) { |
| 47 | poll_fn(|cx| self.poll_ready(cx)).await |
| 48 | } |
| 49 | /// Asynchronously read from the input stream. |
| 50 | /// This method is the same as [`AsyncRead::read`], but doesn't require a `&mut self`. |
| 51 | pub async fn read(&self, buf: &mut [u8]) -> std::io::Result<usize> { |