pub trait Rewind: ReadSite {
// Required methods
fn is_done(&mut self) -> Result<bool>;
fn rewind(&mut self) -> Result<()>;
}
Expand description
A reader type that can return to the beginning of the data.
Required Methods§
Sourcefn is_done(&mut self) -> Result<bool>
fn is_done(&mut self) -> Result<bool>
Returns true
if reader has reached the end of the data, false
otherwise.
Sourcefn rewind(&mut self) -> Result<()>
fn rewind(&mut self) -> Result<()>
Positions reader at the beginning of the data.
The stream should be positioned so as to be ready to call ReadSite::read_site
.
In particular, the stream should be positioned past any magic number, headers, etc.