Trait Rewind

Source
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§

Source

fn is_done(&mut self) -> Result<bool>

Returns true if reader has reached the end of the data, false otherwise.

Source

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.

Implementations on Foreign Types§

Source§

impl<'a, T> Rewind for &'a mut T
where T: Rewind,

Source§

fn is_done(&mut self) -> Result<bool>

Source§

fn rewind(&mut self) -> Result<()>

Implementors§

Source§

impl<R> Rewind for Enumerate<R>
where R: Rewind,

Source§

impl<R> Rewind for Take<Enumerate<R>>
where R: Rewind,

Source§

impl<const D: usize, R> Rewind for Reader<D, R>
where R: BufRead + Seek,