Trait fuchsia_fs::file::AsyncReadAt
source · pub trait AsyncReadAt {
// Required method
fn poll_read_at(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
offset: u64,
buf: &mut [u8],
) -> Poll<Result<usize>>;
}
Expand description
Trait for reading at a given offset asynchronously.
This is basically futures::io::AsyncRead
with an extra offset.
Required Methods§
sourcefn poll_read_at(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
offset: u64,
buf: &mut [u8],
) -> Poll<Result<usize>>
fn poll_read_at( self: Pin<&mut Self>, cx: &mut Context<'_>, offset: u64, buf: &mut [u8], ) -> Poll<Result<usize>>
Attempt to read at most buf.len()
bytes starting at offset
into buf
. On success
returns the number of bytes read.
Contents of buf
are only altered on success.
Reads of more than zero but fewer than buf.len()
bytes do NOT indicate EOF.
Reads of zero bytes only occur if buf.len() == 0
or EOF.