pub trait AsyncZeroCopyWriter: ZeroCopyWriter {
// Required method
fn async_write_from<'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 a RawFd
into the fuse transport without first storing
it in an intermediate buffer in asynchronous mode.
Required Methods§
Sourcefn async_write_from<'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_write_from<'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 f
at offset off
directly into self
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
f
. - There is no more space in
self
. count
was0
.
§Errors
If any error is returned then the implementation must guarantee that no bytes were copied
from f
. If the underlying read from f
returns 0
then the implementation must return an
error of the kind io::ErrorKind::UnexpectedEof
.