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.
sourcepub fn unsplit(self, wr: WriteHalf<T>) -> Twhere
T: Unpin,
pub fn unsplit(self, wr: WriteHalf<T>) -> Twhere
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 comparing the stream ID
of the two halves.
Trait Implementations
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 Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more