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.
Required Methods§
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".