Trait base::WriteZeroesAt

source ·
pub trait WriteZeroesAt {
    // Required method
    fn write_zeroes_at(&self, offset: u64, length: usize) -> Result<usize>;

    // Provided method
    fn write_zeroes_all_at(&self, offset: u64, length: usize) -> Result<()> { ... }
}
Expand description

A trait for writing zeroes to an arbitrary position in a file.

Required Methods§

source

fn write_zeroes_at(&self, offset: u64, length: usize) -> Result<usize>

Write up to length bytes of zeroes starting at offset, returning how many bytes were written.

Provided Methods§

source

fn write_zeroes_all_at(&self, offset: u64, length: usize) -> Result<()>

Write zeroes starting at offset until length bytes have been written.

This method will continuously call write_zeroes_at until the requested length is satisfied or an error is encountered.

Implementations on Foreign Types§

source§

impl WriteZeroesAt for File

source§

fn write_zeroes_at(&self, offset: u64, length: usize) -> Result<usize>

Implementors§