Struct ReadHalf

struct ReadHalf<T> { ... }

The readable half of a value returned from 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.

fn unsplit(self: Self, wr: WriteHalf<T>) -> T
where
    T: Unpin

Reunites with a previously split WriteHalf.

Panics

If this ReadHalf and the given WriteHalf do not originate from the same split operation this method will panic. This can be checked ahead of time by calling is_pair_of().

impl<R> AsyncReadExt for ReadHalf<T>

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> 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: AsyncRead> AsyncRead for ReadHalf<T>

fn poll_read(self: Pin<&mut Self>, cx: &mut Context<'_>, buf: &mut ReadBuf<'_>) -> Poll<Result<()>>

impl<T: Send> Send for ReadHalf<T>

impl<T: Sync> Sync for ReadHalf<T>

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

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