pub struct OwnedWriteHalf { /* private fields */ }
Expand description
Owned write half of a TcpStream
, created by into_split
.
Note that in the AsyncWrite
implementation of this type, poll_shutdown
will
shut down the TCP stream in the write direction. Dropping the write half
will also shut down the write half of the TCP 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<TcpStream, ReuniteError>
pub fn reunite(self, other: OwnedReadHalf) -> Result<TcpStream, ReuniteError>
Attempts to put the two halves of a TcpStream
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<TcpStream> for OwnedWriteHalf
impl AsRef<TcpStream> for OwnedWriteHalf
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_write_buf<B: Buf>(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
buf: &mut B
) -> Poll<Result<usize>>
fn poll_write_buf<B: Buf>(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
buf: &mut B
) -> Poll<Result<usize>>
Writes a Buf
into this value, returning how many bytes were written. 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