Trait AsyncZeroCopyReader

Source
pub trait AsyncZeroCopyReader: ZeroCopyReader {
    // Required method
    fn async_read_to<'life0, 'async_trait>(
        &'life0 mut self,
        f: Arc<dyn AsyncFileReadWriteVolatile>,
        count: usize,
        off: u64,
    ) -> Pin<Box<dyn Future<Output = Result<usize>> + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

A trait for directly copying data from the fuse transport into a File without first storing it in an intermediate buffer in asynchronous mode.

Required Methods§

Source

fn async_read_to<'life0, 'async_trait>( &'life0 mut self, f: Arc<dyn AsyncFileReadWriteVolatile>, count: usize, off: u64, ) -> Pin<Box<dyn Future<Output = Result<usize>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Copies at most count bytes from self directly into f at offset off without storing it in any intermediate buffers. If the return value is Ok(n) then it must be guaranteed that 0 <= n <= count. If n is 0, then it can indicate one of 3 possibilities:

  1. There is no more data left in self.
  2. There is no more space in f.
  3. count was 0.
§Errors

If any error is returned then the implementation must guarantee that no bytes were copied from self. If the underlying write to f returns 0 then the implementation must return an error of the kind io::ErrorKind::WriteZero.

Implementors§