fn fill_buf(&mut self) -> FillBuf<'_, Self>
    where
        Self: Unpin,
    {
        assert_future::<Result<&[u8]>, _>(FillBuf::new(self))
    }
Creates a future which will wait for a non-empty buffer to be available from this I/O
object or EOF to be reached.

This method is the async equivalent to [`BufRead::fill_buf`](std::io::BufRead::fill_buf).

```rust
# futures::executor::block_on(async {
use futures::{io::AsyncBufReadExt as _, stream::{iter, TryStreamExt as _}};

let mut stream = iter(vec![Ok(vec![1, 2, 3]), Ok(vec![4, 5, 6])]).into_async_read();

assert_eq!(stream.fill_buf().await?, vec![1, 2, 3]);
stream.consume_unpin(2);

assert_eq!(stream.fill_buf().await?, vec![3]);
stream.consume_unpin(1);

assert_eq!(stream.fill_buf().await?, vec![4, 5, 6]);
stream.consume_unpin(3);

assert_eq!(stream.fill_buf().await?, vec![]);
# Ok::<(), Box<dyn std::error::Error>>(()) }).unwrap();
```
futures-util/src/io/mod.rs