Skip to main content

AsyncWriteExt

Trait AsyncWriteExt 

Source
pub trait AsyncWriteExt: AsyncWrite {
    // Provided method
    fn write_all<'a, E: 'static, const EVENTS: usize, const TASKS: usize, const TASK_SIZE: usize, const ROOT_TASK_SIZE: usize, const TIMERS: usize, const FDS: usize>(
        &'a mut self,
        ctx: &'a Context<'_, E, EVENTS, TASKS, TASK_SIZE, ROOT_TASK_SIZE, TIMERS, FDS>,
        buf: &'a [u8],
    ) -> impl Future<Output = Result<(), WriteAllError<Self::Error>>> { ... }
}
Expand description

Helper methods on top of AsyncWrite, implemented for every AsyncWrite.

Provided Methods§

Source

fn write_all<'a, E: 'static, const EVENTS: usize, const TASKS: usize, const TASK_SIZE: usize, const ROOT_TASK_SIZE: usize, const TIMERS: usize, const FDS: usize>( &'a mut self, ctx: &'a Context<'_, E, EVENTS, TASKS, TASK_SIZE, ROOT_TASK_SIZE, TIMERS, FDS>, buf: &'a [u8], ) -> impl Future<Output = Result<(), WriteAllError<Self::Error>>>

Writes the whole given buffer, calling AsyncWrite::write until it’s done.

§Errors

Returns an error if writing fails or if the stream accepts zero bytes.

§Cancel safety

This method is not cancel safe: an unknown number of bytes from buf may already be written.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§