pub struct OwnedReadHalf { /* private fields */ }
Expand description
Owned read half of a UnixStream
, created by into_split
.
Reading from an OwnedReadHalf
is usually done using the convenience methods found
on the AsyncReadExt
trait. Examples import this trait through the prelude.
Implementations
sourceimpl OwnedReadHalf
impl OwnedReadHalf
sourcepub fn reunite(self, other: OwnedWriteHalf) -> Result<UnixStream, ReuniteError>
pub fn reunite(self, other: OwnedWriteHalf) -> Result<UnixStream, ReuniteError>
Attempts to put the two halves of a UnixStream
back together and
recover the original socket. Succeeds only if the two halves
originated from the same call to into_split
.
Trait Implementations
sourceimpl AsRef<UnixStream> for OwnedReadHalf
impl AsRef<UnixStream> for OwnedReadHalf
sourcefn as_ref(&self) -> &UnixStream
fn as_ref(&self) -> &UnixStream
Performs the conversion.
sourceimpl AsyncRead for OwnedReadHalf
impl AsyncRead for OwnedReadHalf
sourceunsafe fn prepare_uninitialized_buffer(&self, _: &mut [MaybeUninit<u8>]) -> bool
unsafe fn prepare_uninitialized_buffer(&self, _: &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
Auto Trait Implementations
impl !RefUnwindSafe for OwnedReadHalf
impl Send for OwnedReadHalf
impl Sync for OwnedReadHalf
impl Unpin for OwnedReadHalf
impl !UnwindSafe for OwnedReadHalf
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