Trait bao_tree::io::sync::SliceWriter

source ·
pub trait SliceWriter {
    // Required method
    fn write_at(&mut self, offset: u64, src: &[u8]) -> Result<()>;
}
Expand description

A writer that can write a slice at a specified offset

Will extend the file if the offset is past the end of the file, just like posix and windows files do.

This is similar to the io interface of sqlite. See xWrite in https://www.sqlite.org/c3ref/io_methods.html

Required Methods§

source

fn write_at(&mut self, offset: u64, src: &[u8]) -> Result<()>

Implementors§

source§

impl<W: Write + Seek> SliceWriter for W