pub struct OwnedWriteHalf { /* private fields */ }
Expand description
Owned write half of a UnixStream
, created by into_split
.
Note that in the AsyncWrite
implementation of this type,
poll_shutdown
will shut down the stream in the write direction.
Dropping the write half will also shut down the write half of the stream.
Writing to an OwnedWriteHalf
is usually done using the convenience methods
found on the AsyncWriteExt
trait. Examples import this trait through
the prelude.
Implementations
sourceimpl OwnedWriteHalf
impl OwnedWriteHalf
sourcepub fn reunite(self, other: OwnedReadHalf) -> Result<UnixStream, ReuniteError>
pub fn reunite(self, other: OwnedReadHalf) -> 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 OwnedWriteHalf
impl AsRef<UnixStream> for OwnedWriteHalf
sourcefn as_ref(&self) -> &UnixStream
fn as_ref(&self) -> &UnixStream
Performs the conversion.
sourceimpl AsyncWrite for OwnedWriteHalf
impl AsyncWrite for OwnedWriteHalf
sourcefn poll_write(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
buf: &[u8]
) -> Poll<Result<usize>>
fn poll_write(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
buf: &[u8]
) -> Poll<Result<usize>>
Attempt to write bytes from buf
into the object. Read more
sourcefn poll_flush(self: Pin<&mut Self>, _: &mut Context<'_>) -> Poll<Result<()>>
fn poll_flush(self: Pin<&mut Self>, _: &mut Context<'_>) -> Poll<Result<()>>
Attempts to flush the object, ensuring that any buffered data reach their destination. Read more
sourceimpl Debug for OwnedWriteHalf
impl Debug for OwnedWriteHalf
Auto Trait Implementations
impl !RefUnwindSafe for OwnedWriteHalf
impl Send for OwnedWriteHalf
impl Sync for OwnedWriteHalf
impl Unpin for OwnedWriteHalf
impl !UnwindSafe for OwnedWriteHalf
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