pub trait Reader<T>: Iterator {
// Required methods
fn len(&self) -> usize;
fn pos(&self) -> usize;
fn rollback(&mut self, amount: usize) -> Result<(), ()>;
fn try_read(&mut self, amount: usize) -> Option<T>;
// Provided method
fn is_end(&self) -> bool { ... }
}Expand description
Provides a way to effectively read an object piece by piece.