pub trait AsyncReadManagedAt {
type Buffer: IoBuf;
// Required method
async fn read_managed_at(
&self,
len: usize,
pos: u64,
) -> Result<Option<Self::Buffer>, Error>;
}Available on crate feature
io only.Expand description
§AsyncReadAtManaged
Async read with buffer pool and position
Required Associated Types§
Required Methods§
Sourceasync fn read_managed_at(
&self,
len: usize,
pos: u64,
) -> Result<Option<Self::Buffer>, Error>
async fn read_managed_at( &self, len: usize, pos: u64, ) -> Result<Option<Self::Buffer>, Error>
Read some bytes from this source at position and return a
Self::Buffer.
Returning Ok(None) is similar to Ok(0) for normal AsyncReadAt.
§Implementation Note
- If
len== 0, implementation should use buffer’s size aslen - if
len> 0,min(len, buffer_size)will be the max number of bytes to be read.
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.