Struct ReadHalf

struct ReadHalf<T> { ... }

The readable half of an object returned from AsyncRead::split.

Implementations

impl<T> ReadHalf<T>

fn is_pair_of(self: &Self, other: &WriteHalf<T>) -> bool

Checks if this ReadHalf and some WriteHalf were split from the same stream.

impl<T: Unpin> ReadHalf<T>

fn reunite(self: Self, other: WriteHalf<T>) -> Result<T, ReuniteError<T>>

Attempts to put the two "halves" of a split AsyncRead + AsyncWrite back together. Succeeds only if the ReadHalf<T> and WriteHalf<T> are a matching pair originating from the same call to AsyncReadExt::split.

impl<R> AsyncReadExt for ReadHalf<T>

impl<R: AsyncRead> AsyncRead for ReadHalf<R>

fn poll_read(self: Pin<&mut Self>, cx: &mut Context<'_>, buf: &mut [u8]) -> Poll<Result<usize>>
fn poll_read_vectored(self: Pin<&mut Self>, cx: &mut Context<'_>, bufs: &mut [IoSliceMut<'_>]) -> Poll<Result<usize>>

impl<T> Any for ReadHalf<T>

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for ReadHalf<T>

fn borrow(self: &Self) -> &T

impl<T> BorrowMut for ReadHalf<T>

fn borrow_mut(self: &mut Self) -> &mut T

impl<T> Freeze for ReadHalf<T>

impl<T> From for ReadHalf<T>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> RefUnwindSafe for ReadHalf<T>

impl<T> Send for ReadHalf<T>

impl<T> Sync for ReadHalf<T>

impl<T> Unpin for ReadHalf<T>

impl<T> UnsafeUnpin for ReadHalf<T>

impl<T> UnwindSafe for ReadHalf<T>

impl<T, U> Into for ReadHalf<T>

fn into(self: Self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom for ReadHalf<T>

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

impl<T, U> TryInto for ReadHalf<T>

fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>

impl<T: $crate::fmt::Debug> Debug for ReadHalf<T>

fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result