pub trait AsyncReadWith<'a> {
type ReadFuture: CompletionFuture<Output = Result<()>>;
// Required method
fn read(&'a mut self, buf: ReadBufMut<'a>) -> Self::ReadFuture;
}Expand description
Read bytes from a source asynchronously with a specific lifetime.
Required Associated Types§
Sourcetype ReadFuture: CompletionFuture<Output = Result<()>>
type ReadFuture: CompletionFuture<Output = Result<()>>
The future that reads from the source.
Required Methods§
Sourcefn read(&'a mut self, buf: ReadBufMut<'a>) -> Self::ReadFuture
fn read(&'a mut self, buf: ReadBufMut<'a>) -> Self::ReadFuture
Pull some bytes from this source into the specified buffer.
If this reads 0 bytes of data, either the buffer was 0 bytes in length or the stream has reached EOF.