AsyncReadManagedAt

Trait AsyncReadManagedAt 

pub trait AsyncReadManagedAt {
    type BufferPool;
    type Buffer<'a>;

    // Required method
    async fn read_managed_at<'a>(
        &self,
        buffer_pool: &'a Self::BufferPool,
        len: usize,
        pos: u64,
    ) -> Result<Self::Buffer<'a>, Error>;
}
Available on crate feature io only.
Expand description

§AsyncReadAtManaged

Async read with buffer pool and position

Required Associated Types§

type BufferPool

Buffer pool type

type Buffer<'a>

Filled buffer type

Required Methods§

async fn read_managed_at<'a>( &self, buffer_pool: &'a Self::BufferPool, len: usize, pos: u64, ) -> Result<Self::Buffer<'a>, Error>

Read some bytes from this source at position with Self::BufferPool and return a Self::Buffer.

If len == 0, will use Self::BufferPool inner buffer size as the max len, if len > 0, min(len, inner buffer size) will be the read max len

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§