We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2c02037 commit abda966Copy full SHA for abda966
src/io/buf_read/mod.rs
@@ -41,6 +41,15 @@ cfg_if! {
41
/// [`futures::io::AsyncBufRead`]:
42
/// https://docs.rs/futures-preview/0.3.0-alpha.17/futures/io/trait.AsyncBufRead.html
43
pub trait BufRead {
44
+ /// Tells this buffer that `amt` bytes have been consumed from the buffer, so they should no
45
+ /// longer be returned in calls to `read`.
46
+ fn consume(self: Pin<&mut Self>, amt: usize)
47
+ where
48
+ Self: AsyncBufRead,
49
+ {
50
+ AsyncBufRead::consume(self, amt)
51
+ }
52
+
53
/// Reads all bytes into `buf` until the delimiter `byte` or EOF is reached.
54
///
55
/// This function will read bytes from the underlying stream until the delimiter or EOF is
0 commit comments