pub struct ReadHalf<T> { /* private fields */ }
Expand description
The readable half of a value returned from split
.
Implementations
sourceimpl<T> ReadHalf<T>
impl<T> ReadHalf<T>
sourcepub fn is_pair_of(&self, other: &WriteHalf<T>) -> bool
pub fn is_pair_of(&self, other: &WriteHalf<T>) -> bool
Checks if this ReadHalf
and some WriteHalf
were split from the same
stream.
Trait Implementations
sourceimpl<T: AsyncRead> AsyncRead for ReadHalf<T>
impl<T: AsyncRead> AsyncRead for ReadHalf<T>
sourcefn 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>>
Attempts to read from the AsyncRead
into buf
. Read more
sourcefn 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>>
Pulls some bytes from this source into the specified BufMut
, returning
how many bytes were read. Read more
sourceunsafe 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 more
impl<T: Send> Send for ReadHalf<T>
impl<T: Sync> Sync for ReadHalf<T>
Auto Trait Implementations
impl<T> !RefUnwindSafe for ReadHalf<T>
impl<T> Unpin for ReadHalf<T>
impl<T> !UnwindSafe for ReadHalf<T>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more