diff options
Diffstat (limited to 'buffered-reader/src')
-rw-r--r-- | buffered-reader/src/dup.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/buffered-reader/src/dup.rs b/buffered-reader/src/dup.rs index c06721cc..ae9ce217 100644 --- a/buffered-reader/src/dup.rs +++ b/buffered-reader/src/dup.rs @@ -54,6 +54,11 @@ impl<'a, C> BufferedReaderDup<'a, C> { pub fn total_out(&self) -> usize { return self.cursor; } + + /// Resets the cursor to the beginning of the stream. + pub fn rewind(&mut self) { + self.cursor = 0; + } } impl<'a, C> io::Read for BufferedReaderDup<'a, C> { |