pub struct WriteHalf<'a>(_);
Expand description
Borrowed write half of a TcpStream
, created by split
.
Note that in the AsyncWrite
implemenation of this type, poll_shutdown
will
shut down the TCP stream in the write direction.
Writing to an WriteHalf
is usually done using the convenience methods found
on the AsyncWriteExt
trait. Examples import this trait through the prelude.
Trait Implementations
sourceimpl AsyncWrite for WriteHalf<'_>
impl AsyncWrite for WriteHalf<'_>
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
Auto Trait Implementations
impl<'a> !RefUnwindSafe for WriteHalf<'a>
impl<'a> Send for WriteHalf<'a>
impl<'a> Sync for WriteHalf<'a>
impl<'a> Unpin for WriteHalf<'a>
impl<'a> !UnwindSafe for WriteHalf<'a>
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