Closed
Description
This would fill the internal buffer until the given amount is reached and then provide access to it. read()
could return a value that implements Deref<Target=[u8]>
and on Drop
consumes the read data, peek()
would only provide direct access to an &[u8]
.
This seems useful to have to allow copy-less operation on AsyncBufRead
impls. If they implement AsyncRead
in addition, a copy would always be necessary.
Inspired partially by https://boats.gitlab.io/blog/post/io-uring/