Skip to main content

AsyncReadAt

Trait AsyncReadAt 

Source
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§

Source

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§

Source

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".

Implementations on Foreign Types§

Source§

impl AsyncReadAt for [u8]

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Implementors§

Source§

impl AsyncReadAt for File

Source§

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

Source§

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

Available on crate feature allocator_api only.
Source§

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

Available on crate feature allocator_api only.
Source§

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

Available on crate feature allocator_api only.
Source§

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