pub trait Read {
// Required method
fn read(&mut self, buf: &mut [u8]) -> Result<usize>;
// Provided method
fn read_exact(&mut self, buf: &mut [u8]) -> Result<()> { ... }
}
Expand description
A trait for objects that provide streaming read capability.
Required Methods§
Provided Methods§
sourcefn read_exact(&mut self, buf: &mut [u8]) -> Result<()>
fn read_exact(&mut self, buf: &mut [u8]) -> Result<()>
Read exactly enough bytes to fill the buffer.
Semantics match std::io::Read::read_exact()
.