pub trait AsyncReadExt: AsyncRead {
// Provided method
fn read_exact<'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 mut [u8],
) -> impl Future<Output = Result<(), ReadExactError<Self::Error>>> { ... }
}Provided Methods§
Sourcefn read_exact<'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 mut [u8],
) -> impl Future<Output = Result<(), ReadExactError<Self::Error>>>
fn read_exact<'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 mut [u8], ) -> impl Future<Output = Result<(), ReadExactError<Self::Error>>>
Fills the whole given buffer, calling AsyncRead::read until it’s done.
§Errors
Returns an error if:
- reading fails
- or if the stream is closed before the buffer is filled.
§Cancel safety
This method is not cancel safe: an unknown number of bytes may already be read into buf.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".