Skip to main content

AsyncWriteAt

Trait AsyncWriteAt 

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

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

§AsyncWriteAt

Async write with a ownership of a buffer and a position

Required Methods§

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

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

Provided Methods§

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

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

Implementations on Foreign Types§

§

impl AsyncWriteAt for [u8]

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

Implementors§

Source§

impl AsyncWriteAt for &File

Source§

impl AsyncWriteAt for File

§

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

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.

§

impl<T> AsyncWriteAt for WriteHalf<T>
where T: AsyncWriteAt,

§

impl<W, A> AsyncWriteAt for Box<W, A>
where W: AsyncWriteAt + ?Sized, A: Allocator,