Trait fuse_backend_rs::api::filesystem::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§
sourcefn 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,
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:
- There is no more data left in
self. - There is no more space in
f. countwas0.
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.