Trait completion::io::AsyncReadWith [−][src]
This is supported on crate feature
std
only.Read bytes from a source asynchronously with a specific lifetime.
Associated Types
type ReadFuture: CompletionFuture
[src]
The future that reads from the source.
Required methods
pub fn read(&'a mut self, buf: ReadBufMut<'a>) -> Self::ReadFuture
[src]
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.
Implementations on Foreign Types
impl<'a, 's> AsyncReadWith<'a> for &'s [u8]
[src]
type ReadFuture = ReadSlice<'a, 's>
pub fn read(
&'a mut self,
buf: ReadBufMut<'a>
) -> <&'s [u8] as AsyncReadWith<'a>>::ReadFutureⓘ
[src]
&'a mut self,
buf: ReadBufMut<'a>
) -> <&'s [u8] as AsyncReadWith<'a>>::ReadFutureⓘ
impl<'a, T> AsyncReadWith<'a> for Cursor<T> where
T: AsRef<[u8]>,
[src]
T: AsRef<[u8]>,
type ReadFuture = ReadCursor<'a, T>
pub fn read(
&'a mut self,
buf: ReadBufMut<'a>
) -> <Cursor<T> as AsyncReadWith<'a>>::ReadFuture
[src]
&'a mut self,
buf: ReadBufMut<'a>
) -> <Cursor<T> as AsyncReadWith<'a>>::ReadFuture
impl<'a> AsyncReadWith<'a> for Empty
[src]
type ReadFuture = Ready<Result<(), Error>>
pub fn read(
&'a mut self,
_buf: ReadBufMut<'a>
) -> <Empty as AsyncReadWith<'a>>::ReadFuture
[src]
&'a mut self,
_buf: ReadBufMut<'a>
) -> <Empty as AsyncReadWith<'a>>::ReadFuture
impl<'a, '_, R> AsyncReadWith<'a> for &'_ mut R where
R: AsyncReadWith<'a> + ?Sized,
[src]
R: AsyncReadWith<'a> + ?Sized,
type ReadFuture = <R as AsyncReadWith<'a>>::ReadFuture
pub fn read(
&'a mut self,
buf: ReadBufMut<'a>
) -> <&'_ mut R as AsyncReadWith<'a>>::ReadFuture
[src]
&'a mut self,
buf: ReadBufMut<'a>
) -> <&'_ mut R as AsyncReadWith<'a>>::ReadFuture
impl<'a, R> AsyncReadWith<'a> for Box<R, Global> where
R: AsyncReadWith<'a> + ?Sized,
[src]
R: AsyncReadWith<'a> + ?Sized,
type ReadFuture = <R as AsyncReadWith<'a>>::ReadFuture
pub fn read(
&'a mut self,
buf: ReadBufMut<'a>
) -> <Box<R, Global> as AsyncReadWith<'a>>::ReadFuture
[src]
&'a mut self,
buf: ReadBufMut<'a>
) -> <Box<R, Global> as AsyncReadWith<'a>>::ReadFuture
impl<'a> AsyncReadWith<'a> for Repeat
[src]
type ReadFuture = ReadRepeat<'a>
pub fn read(
&'a mut self,
buf: ReadBufMut<'a>
) -> <Repeat as AsyncReadWith<'a>>::ReadFuture
[src]
&'a mut self,
buf: ReadBufMut<'a>
) -> <Repeat as AsyncReadWith<'a>>::ReadFuture