Trait compio_io::AsyncWriteAt

source ·
pub trait AsyncWriteAt {
    // Required method
    async fn write_at<T: IoBuf>(
        &mut self,
        buf: T,
        pos: u64,
    ) -> BufResult<usize, T>;

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

§AsyncWriteAt

Async write with a ownership of a buffer and a position

Required Methods§

source

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

Like AsyncWrite::write, except that it writes at a specified position.

Provided Methods§

source

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

Like AsyncWrite::write_vectored, except that it writes at a specified position.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl AsyncWriteAt for Vec<u8>

This implementation aligns the behavior of files. If pos is larger than the vector length, the vectored will be extended, and the extended area will be filled with 0.

source§

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

source§

impl AsyncWriteAt for [u8]

source§

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

source§

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

source§

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

source§

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

source§

impl<W: AsyncWriteAt + ?Sized> AsyncWriteAt for Box<W>

source§

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

source§

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

source§

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

source§

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

Implementors§