pub struct ReadHalf<T> { /* private fields */ }
Available on crate feature
io-util
only.Expand description
The readable half of a value returned from split
.
Implementations§
Trait Implementations§
Source§impl<T: AsyncRead> AsyncRead for ReadHalf<T>
impl<T: AsyncRead> AsyncRead for ReadHalf<T>
Source§fn poll_read(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
buf: &mut [u8],
) -> Poll<Result<usize>>
fn poll_read( self: Pin<&mut Self>, cx: &mut Context<'_>, buf: &mut [u8], ) -> Poll<Result<usize>>
Source§fn poll_read_buf<B: BufMut>(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
buf: &mut B,
) -> Poll<Result<usize>>
fn poll_read_buf<B: BufMut>( self: Pin<&mut Self>, cx: &mut Context<'_>, buf: &mut B, ) -> Poll<Result<usize>>
Pull some bytes from this source into the specified
BufMut
, returning
how many bytes were read. Read moreSource§unsafe fn prepare_uninitialized_buffer(
&self,
buf: &mut [MaybeUninit<u8>],
) -> bool
unsafe fn prepare_uninitialized_buffer( &self, buf: &mut [MaybeUninit<u8>], ) -> bool
Prepares an uninitialized buffer to be safe to pass to
read
. Returns
true
if the supplied buffer was zeroed out. Read moreimpl<T: Send> Send for ReadHalf<T>
impl<T: Sync> Sync for ReadHalf<T>
Auto Trait Implementations§
impl<T> Freeze for ReadHalf<T>
impl<T> !RefUnwindSafe for ReadHalf<T>
impl<T> Unpin for ReadHalf<T>
impl<T> !UnwindSafe for ReadHalf<T>
Blanket Implementations§
Source§impl<R> AsyncReadExt for R
impl<R> AsyncReadExt for R
Source§fn read<'a>(&'a mut self, buf: &'a mut [u8]) -> Read<'a, Self>where
Self: Unpin,
fn read<'a>(&'a mut self, buf: &'a mut [u8]) -> Read<'a, Self>where
Self: Unpin,
Available on crate feature
io-util
only.Pull some bytes from this source into the specified buffer,
returning how many bytes were read. Read more
Source§fn read_buf<'a, B>(&'a mut self, buf: &'a mut B) -> ReadBuf<'a, Self, B>
fn read_buf<'a, B>(&'a mut self, buf: &'a mut B) -> ReadBuf<'a, Self, B>
Available on crate feature
io-util
only.Pull some bytes from this source into the specified buffer,
advancing the buffer’s internal cursor. Read more
Source§fn read_exact<'a>(&'a mut self, buf: &'a mut [u8]) -> ReadExact<'a, Self>where
Self: Unpin,
fn read_exact<'a>(&'a mut self, buf: &'a mut [u8]) -> ReadExact<'a, Self>where
Self: Unpin,
Available on crate feature
io-util
only.Read the exact number of bytes required to fill
buf
. Read moreSource§fn read_u8<'a>(&'a mut self) -> ReadU8<&'a mut Self>where
Self: Unpin,
fn read_u8<'a>(&'a mut self) -> ReadU8<&'a mut Self>where
Self: Unpin,
Available on crate feature
io-util
only.Reads an unsigned 8 bit integer from the underlying reader. Read more
Source§fn read_i8<'a>(&'a mut self) -> ReadI8<&'a mut Self>where
Self: Unpin,
fn read_i8<'a>(&'a mut self) -> ReadI8<&'a mut Self>where
Self: Unpin,
Available on crate feature
io-util
only.Reads a signed 8 bit integer from the underlying reader. Read more
Source§fn read_u16<'a>(&'a mut self) -> ReadU16<&'a mut Self>where
Self: Unpin,
fn read_u16<'a>(&'a mut self) -> ReadU16<&'a mut Self>where
Self: Unpin,
Available on crate feature
io-util
only.Reads an unsigned 16-bit integer in big-endian order from the
underlying reader. Read more
Source§fn read_i16<'a>(&'a mut self) -> ReadI16<&'a mut Self>where
Self: Unpin,
fn read_i16<'a>(&'a mut self) -> ReadI16<&'a mut Self>where
Self: Unpin,
Available on crate feature
io-util
only.Reads a signed 16-bit integer in big-endian order from the
underlying reader. Read more
Source§fn read_u32<'a>(&'a mut self) -> ReadU32<&'a mut Self>where
Self: Unpin,
fn read_u32<'a>(&'a mut self) -> ReadU32<&'a mut Self>where
Self: Unpin,
Available on crate feature
io-util
only.Reads an unsigned 32-bit integer in big-endian order from the
underlying reader. Read more
Source§fn read_i32<'a>(&'a mut self) -> ReadI32<&'a mut Self>where
Self: Unpin,
fn read_i32<'a>(&'a mut self) -> ReadI32<&'a mut Self>where
Self: Unpin,
Available on crate feature
io-util
only.Reads a signed 32-bit integer in big-endian order from the
underlying reader. Read more
Source§fn read_u64<'a>(&'a mut self) -> ReadU64<&'a mut Self>where
Self: Unpin,
fn read_u64<'a>(&'a mut self) -> ReadU64<&'a mut Self>where
Self: Unpin,
Available on crate feature
io-util
only.Reads an unsigned 64-bit integer in big-endian order from the
underlying reader. Read more
Source§fn read_i64<'a>(&'a mut self) -> ReadI64<&'a mut Self>where
Self: Unpin,
fn read_i64<'a>(&'a mut self) -> ReadI64<&'a mut Self>where
Self: Unpin,
Available on crate feature
io-util
only.Reads an signed 64-bit integer in big-endian order from the
underlying reader. Read more
Source§fn read_u128<'a>(&'a mut self) -> ReadU128<&'a mut Self>where
Self: Unpin,
fn read_u128<'a>(&'a mut self) -> ReadU128<&'a mut Self>where
Self: Unpin,
Available on crate feature
io-util
only.Reads an unsigned 128-bit integer in big-endian order from the
underlying reader. Read more
Source§fn read_i128<'a>(&'a mut self) -> ReadI128<&'a mut Self>where
Self: Unpin,
fn read_i128<'a>(&'a mut self) -> ReadI128<&'a mut Self>where
Self: Unpin,
Available on crate feature
io-util
only.Reads an signed 128-bit integer in big-endian order from the
underlying reader. Read more
Source§fn read_to_end<'a>(&'a mut self, buf: &'a mut Vec<u8>) -> ReadToEnd<'a, Self>where
Self: Unpin,
fn read_to_end<'a>(&'a mut self, buf: &'a mut Vec<u8>) -> ReadToEnd<'a, Self>where
Self: Unpin,
Available on crate feature
io-util
only.Read all bytes until EOF in this source, placing them into
buf
. Read moreSource§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more