AsyncReadAt

Trait AsyncReadAt 

pub trait AsyncReadAt {
    // Required method
    async fn read_at<T>(&self, buf: T, pos: u64) -> BufResult<usize, T>
       where T: IoBufMut;

    // Provided method
    async fn read_vectored_at<T>(&self, buf: T, pos: u64) -> BufResult<usize, T>
       where T: IoVectoredBufMut { ... }
}
Available on crate feature io only.
Expand description

§AsyncReadAt

Async read with a ownership of a buffer and a position

Required Methods§

async fn read_at<T>(&self, buf: T, pos: u64) -> BufResult<usize, T>
where T: IoBufMut,

Like AsyncRead::read, except that it reads at a specified position.

Provided Methods§

async fn read_vectored_at<T>(&self, buf: T, pos: u64) -> BufResult<usize, T>

Like AsyncRead::read_vectored, except that it reads at a specified position.

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.

Implementations on Foreign Types§

§

impl AsyncReadAt for [u8]

§

async fn read_at<T>(&self, buf: T, pos: u64) -> BufResult<usize, T>
where T: IoBufMut,

§

async fn read_vectored_at<T>(&self, buf: T, pos: u64) -> BufResult<usize, T>

§

impl<A> AsyncReadAt for &A
where A: AsyncReadAt + ?Sized,

§

async fn read_at<T>(&self, buf: T, pos: u64) -> BufResult<usize, T>
where T: IoBufMut,

§

async fn read_vectored_at<T>(&self, buf: T, pos: u64) -> BufResult<usize, T>

§

impl<A> AsyncReadAt for &mut A
where A: AsyncReadAt + ?Sized,

§

async fn read_at<T>(&self, buf: T, pos: u64) -> BufResult<usize, T>
where T: IoBufMut,

§

async fn read_vectored_at<T>(&self, buf: T, pos: u64) -> BufResult<usize, T>

§

impl<const LEN: usize> AsyncReadAt for [u8; LEN]

§

async fn read_at<T>(&self, buf: T, pos: u64) -> BufResult<usize, T>
where T: IoBufMut,

§

async fn read_vectored_at<T>(&self, buf: T, pos: u64) -> BufResult<usize, T>

Implementors§

§

impl AsyncReadAt for File

§

impl<A> AsyncReadAt for Vec<u8, A>
where A: Allocator,

§

impl<R, A> AsyncReadAt for Box<R, A>
where R: AsyncReadAt + ?Sized, A: Allocator,

Available on crate feature allocator_api only.
§

impl<R, A> AsyncReadAt for Rc<R, A>
where R: AsyncReadAt + ?Sized, A: Allocator,

Available on crate feature allocator_api only.
§

impl<R, A> AsyncReadAt for Arc<R, A>
where R: AsyncReadAt + ?Sized, A: Allocator,

Available on crate feature allocator_api only.
§

impl<T> AsyncReadAt for ReadHalf<T>
where T: AsyncReadAt,