Add normal read()
/ peek()
async functions to AsyncBufReadExt
#2144
Labels
read()
/ peek()
async functions to AsyncBufReadExt
#2144
This would fill the internal buffer until the given amount is reached and then provide access to it.
read()
could return a value that implementsDeref<Target=[u8]>
and onDrop
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 implementAsyncRead
in addition, a copy would always be necessary.Inspired partially by https://boats.gitlab.io/blog/post/io-uring/
The text was updated successfully, but these errors were encountered: