compio_io

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

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