pub trait Read {
// Required method
fn read(&self, buf: &mut [u8]) -> Result<usize>;
// Provided method
fn read_exact(&self, buf: &mut [u8]) -> Result<()> { ... }
}
Expand description
The Read
trait allows for reading bytes from a file.