Struct ReadHalf
pub struct ReadHalf<T> { /* private fields */ }
The readable half of a value returned from split.
Implementations
impl<T> ReadHalf<T>
fn is_pair_of(&self, other: &WriteHalf<T>) -> boolChecks if this
ReadHalfand someWriteHalfwere split from the same stream.fn unsplit(self, wr: WriteHalf<T>) -> T where T: Unpin,Reunites with a previously split
WriteHalf.Panics
If this
ReadHalfand the givenWriteHalfdo not originate from the samesplitoperation this method will panic. This can be checked ahead of time by callingis_pair_of().
Trait Implementations
impl<T: AsyncRead> AsyncRead for ReadHalf<T>
fn poll_read(self: Pin<&mut Self>, cx: &mut Context<'_>, buf: &mut ReadBuf<'_>) -> Poll<Result<()>>
impl<T: Debug> Debug for ReadHalf<T>
fn fmt(&self, fmt: &mut Formatter<'_>) -> Result
impl<T: Send> Send for ReadHalf<T>
impl<T: Sync> Sync for ReadHalf<T>
Auto Trait Implementations
impl<T> Freeze for ReadHalf<T>
where
Arc<Inner<T>>: Freeze,
impl<T> RefUnwindSafe for ReadHalf<T>
where
Arc<Inner<T>>: RefUnwindSafe,
impl<T> Unpin for ReadHalf<T>
where
Arc<Inner<T>>: Unpin,
impl<T> UnsafeUnpin for ReadHalf<T>
where
Arc<Inner<T>>: UnsafeUnpin,
impl<T> UnwindSafe for ReadHalf<T>
where
Arc<Inner<T>>: UnwindSafe,
Blanket Implementations
impl<R> AsyncReadExt for ReadHalf<T>
where
R: AsyncRead + ?Sized,
impl<T> Any for ReadHalf<T>
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for ReadHalf<T>
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for ReadHalf<T>
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> From<T> for ReadHalf<T>
fn from(t: T) -> TReturns the argument unchanged.
impl<T, U> Into<U> for ReadHalf<T>
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for ReadHalf<T>
where
U: Into<T>,
type Error = never;fn try_from(value: U) -> Result<T, never>
impl<T, U> TryInto<U> for ReadHalf<T>
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>