pub trait WriteZeroesAt {
// Required method
fn write_zeroes_at(&mut self, offset: u64, length: usize) -> Result<usize>;
// Provided method
fn write_all_zeroes_at(&mut self, offset: u64, length: usize) -> Result<()> { ... }
}
Expand description
A trait for writing zeroes to an arbitrary position in a file.
Required Methods§
Provided Methods§
Sourcefn write_all_zeroes_at(&mut self, offset: u64, length: usize) -> Result<()>
fn write_all_zeroes_at(&mut self, offset: u64, length: usize) -> Result<()>
Write zeroes starting at offset
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
offset
: offset of the file where to write zeroes.length
: the exact number of bytes of zeroes to write to the stream.