Skip to main content

ReadAtAsync

Trait ReadAtAsync 

Source
pub trait ReadAtAsync {
    // Required method
    fn read_at(
        &self,
        buffer: OwnedPages,
        len: u32,
        offset: u64,
    ) -> impl Future<Output = Result<OwnedAlignedBuffer<Align1>, IoBufError<OwnedPages>>>;

    // Provided method
    fn offset(&self, offset: u64) -> ReadAtOffset<'_, Self>
       where Self: Sized { ... }
}
Expand description

Async version of ReadAt, it is neither Send nor Sync and is supposed to be used with concurrent async combinators

Required Methods§

Source

fn read_at( &self, buffer: OwnedPages, len: u32, offset: u64, ) -> impl Future<Output = Result<OwnedAlignedBuffer<Align1>, IoBufError<OwnedPages>>>

Read len bytes at offset into buffer, replacing its contents, see ReadAtSync::read_at() for details

Provided Methods§

Source

fn offset(&self, offset: u64) -> ReadAtOffset<'_, Self>
where Self: Sized,

Get implementation of ReadAtAsync that add specified offset to all attempted reads

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl ReadAtAsync for !

Source§

async fn read_at( &self, _buffer: OwnedPages, _len: u32, _offset: u64, ) -> Result<OwnedAlignedBuffer<Align1>, IoBufError<OwnedPages>>

Source§

impl<T> ReadAtAsync for &T
where T: ReadAtAsync + ?Sized,

Source§

fn read_at( &self, buffer: OwnedPages, len: u32, offset: u64, ) -> impl Future<Output = Result<OwnedAlignedBuffer<Align1>, IoBufError<OwnedPages>>>

Implementors§

Source§

impl<T> ReadAtAsync for ReadAtOffset<'_, T>
where T: ReadAtAsync,