pub struct WriteHalf<'a>(_);
Expand description
Borrowed write half of a UnixStream
, created by split
.
Note that in the AsyncWrite
implemenation of this type, poll_shutdown
will
shut down the UnixStream 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 AsRef<UnixStream> for WriteHalf<'_>
impl AsRef<UnixStream> for WriteHalf<'_>
sourcefn as_ref(&self) -> &UnixStream
fn as_ref(&self) -> &UnixStream
Performs the conversion.
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_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
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