We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8fe7347 commit ab0a4cbCopy full SHA for ab0a4cb
src/io/buf_read/mod.rs
@@ -63,6 +63,15 @@ pub trait BufRead {
63
FillBufFuture::new(self)
64
}
65
66
+ /// Tells this buffer that `amt` bytes have been consumed from the buffer, so they should no
67
+ /// longer be returned in calls to `read`.
68
+ fn consume(&mut self, amt: usize)
69
+ where
70
+ Self: AsyncBufRead + Unpin,
71
+ {
72
+ AsyncBufRead::consume(Pin::new(self), amt)
73
+ }
74
+
75
/// Reads all bytes into `buf` until the delimiter `byte` or EOF is reached.
76
///
77
/// This function will read bytes from the underlying stream until the delimiter or EOF is
0 commit comments