pub trait AsyncSliceWriter: Unpin + Send + Sync {
    // Required method
    fn write_at<'a, 'r>(
        &'a mut self,
        offset: u64,
        buf: &'a [u8]
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'r>>
       where Self: 'r,
             'a: 'r;
}
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.

For external storage such as S3/R2, this might be implemented in terms of async http requests.

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<'a, 'r>( &'a mut self, offset: u64, buf: &'a [u8] ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'r>>where Self: 'r, 'a: 'r,

Implementors§