We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ecf8c64 commit a5e1cbeCopy full SHA for a5e1cbe
src/libstd/io/mod.rs
@@ -558,6 +558,12 @@ pub trait BufRead: Read {
558
/// This function does not perform any I/O, it simply informs this object
559
/// that some amount of its buffer, returned from `fill_buf`, has been
560
/// consumed and should no longer be returned.
561
+ ///
562
+ /// This function is used to tell the buffer how many bytes you've consumed
563
+ /// from the return value of `fill_buf`, and so may do odd things if
564
+ /// `fill_buf` isn't called before calling this.
565
566
+ /// The `amt` must be `<=` the number of bytes in the buffer returned by `fill_buf`.
567
#[stable(feature = "rust1", since = "1.0.0")]
568
fn consume(&mut self, amt: usize);
569
0 commit comments