pub trait WriteZeroes {
// Required method
fn write_zeroes(&mut self, length: usize) -> Result<usize>;
// Provided method
fn write_all_zeroes(&mut self, length: usize) -> Result<()> { ... }
}
Expand description
A trait for writing zeroes to a stream.
Required Methods§
Provided Methods§
Sourcefn write_all_zeroes(&mut self, length: usize) -> Result<()>
fn write_all_zeroes(&mut self, length: usize) -> Result<()>
Write zeroes to the stream until length
bytes have been written.
This method will continuously write zeroes until the requested length
is satisfied or an
unrecoverable error is encountered.
§Arguments
length
: the exact number of bytes of zeroes to write to the stream.