compio_io

Trait AsyncReadAt

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

    // Provided method
    async fn read_vectored_at<T: IoVectoredBufMut>(
        &self,
        buf: T,
        pos: u64,
    ) -> BufResult<usize, T> { ... }
}
Expand description

§AsyncReadAt

Async read with a ownership of a buffer and a position

Required Methods§

Source

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

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

Provided Methods§

Source

async fn read_vectored_at<T: IoVectoredBufMut>( &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§

Source§

impl AsyncReadAt for Vec<u8>

Source§

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

Source§

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

Source§

impl AsyncReadAt for [u8]

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

impl<A: AsyncReadAt + ?Sized> AsyncReadAt for Box<A>

Source§

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

Source§

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

Source§

impl<A: AsyncReadAt + ?Sized> AsyncReadAt for Rc<A>

Source§

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

Source§

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

Source§

impl<A: AsyncReadAt + ?Sized> AsyncReadAt for Arc<A>

Source§

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

Source§

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

Source§

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

Source§

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

Implementors§