pub struct WriteHalf<T> { /* private fields */ }
Expand description
The writable half of an object returned from AsyncRead::split
.
Implementations
sourceimpl<T> WriteHalf<T> where
T: Unpin,
impl<T> WriteHalf<T> where
T: Unpin,
sourcepub fn reunite(self, other: ReadHalf<T>) -> Result<T, ReuniteError<T>>
pub fn reunite(self, other: ReadHalf<T>) -> Result<T, ReuniteError<T>>
Attempts to put the two “halves” of a split AsyncRead + AsyncWrite
back
together. Succeeds only if the ReadHalf<T>
and WriteHalf<T>
are
a matching pair originating from the same call to AsyncReadExt::split
.
Trait Implementations
sourceimpl<W> AsyncWrite for WriteHalf<W> where
W: AsyncWrite,
impl<W> AsyncWrite for WriteHalf<W> where
W: AsyncWrite,
sourcefn poll_write(
self: Pin<&mut WriteHalf<W>>,
cx: &mut Context<'_>,
buf: &[u8]
) -> Poll<Result<usize, Error>>
fn poll_write(
self: Pin<&mut WriteHalf<W>>,
cx: &mut Context<'_>,
buf: &[u8]
) -> Poll<Result<usize, Error>>
Attempt to write bytes from buf
into the object. Read more
sourcefn poll_write_vectored(
self: Pin<&mut WriteHalf<W>>,
cx: &mut Context<'_>,
bufs: &[IoSlice<'_>]
) -> Poll<Result<usize, Error>>
fn poll_write_vectored(
self: Pin<&mut WriteHalf<W>>,
cx: &mut Context<'_>,
bufs: &[IoSlice<'_>]
) -> Poll<Result<usize, Error>>
Attempt to write bytes from bufs
into the object using vectored
IO operations. Read more
Auto Trait Implementations
impl<T> !RefUnwindSafe for WriteHalf<T>
impl<T> Send for WriteHalf<T> where
T: Send,
impl<T> Sync for WriteHalf<T> where
T: Send,
impl<T> Unpin for WriteHalf<T>
impl<T> !UnwindSafe for WriteHalf<T>
Blanket Implementations
sourceimpl<W> AsyncWriteExt for W where
W: AsyncWrite + ?Sized,
impl<W> AsyncWriteExt for W where
W: AsyncWrite + ?Sized,
sourcefn flush(&mut self) -> Flush<'_, Self>ⓘNotable traits for Flush<'_, W>impl<'_, W> Future for Flush<'_, W> where
W: AsyncWrite + Unpin + ?Sized, type Output = Result<(), Error>;
where
Self: Unpin,
fn flush(&mut self) -> Flush<'_, Self>ⓘNotable traits for Flush<'_, W>impl<'_, W> Future for Flush<'_, W> where
W: AsyncWrite + Unpin + ?Sized, type Output = Result<(), Error>;
where
Self: Unpin,
W: AsyncWrite + Unpin + ?Sized, type Output = Result<(), Error>;
Creates a future which will entirely flush this AsyncWrite
. Read more
sourcefn close(&mut self) -> Close<'_, Self>ⓘNotable traits for Close<'_, W>impl<'_, W> Future for Close<'_, W> where
W: AsyncWrite + Unpin + ?Sized, type Output = Result<(), Error>;
where
Self: Unpin,
fn close(&mut self) -> Close<'_, Self>ⓘNotable traits for Close<'_, W>impl<'_, W> Future for Close<'_, W> where
W: AsyncWrite + Unpin + ?Sized, type Output = Result<(), Error>;
where
Self: Unpin,
W: AsyncWrite + Unpin + ?Sized, type Output = Result<(), Error>;
Creates a future which will entirely close this AsyncWrite
.
sourcefn write(&'a mut self, buf: &'a [u8]) -> Write<'a, Self>ⓘNotable traits for Write<'_, W>impl<'_, W> Future for Write<'_, W> where
W: AsyncWrite + Unpin + ?Sized, type Output = Result<usize, Error>;
where
Self: Unpin,
fn write(&'a mut self, buf: &'a [u8]) -> Write<'a, Self>ⓘNotable traits for Write<'_, W>impl<'_, W> Future for Write<'_, W> where
W: AsyncWrite + Unpin + ?Sized, type Output = Result<usize, Error>;
where
Self: Unpin,
W: AsyncWrite + Unpin + ?Sized, type Output = Result<usize, Error>;
Creates a future which will write bytes from buf
into the object. Read more
sourcefn write_vectored(
&'a mut self,
bufs: &'a [IoSlice<'a>]
) -> WriteVectored<'a, Self>ⓘNotable traits for WriteVectored<'_, W>impl<'_, W> Future for WriteVectored<'_, W> where
W: AsyncWrite + Unpin + ?Sized, type Output = Result<usize, Error>;
where
Self: Unpin,
fn write_vectored(
&'a mut self,
bufs: &'a [IoSlice<'a>]
) -> WriteVectored<'a, Self>ⓘNotable traits for WriteVectored<'_, W>impl<'_, W> Future for WriteVectored<'_, W> where
W: AsyncWrite + Unpin + ?Sized, type Output = Result<usize, Error>;
where
Self: Unpin,
W: AsyncWrite + Unpin + ?Sized, type Output = Result<usize, Error>;
Creates a future which will write bytes from bufs
into the object using vectored
IO operations. Read more
sourcefn write_all(&'a mut self, buf: &'a [u8]) -> WriteAll<'a, Self>ⓘNotable traits for WriteAll<'_, W>impl<'_, W> Future for WriteAll<'_, W> where
W: AsyncWrite + Unpin + ?Sized, type Output = Result<(), Error>;
where
Self: Unpin,
fn write_all(&'a mut self, buf: &'a [u8]) -> WriteAll<'a, Self>ⓘNotable traits for WriteAll<'_, W>impl<'_, W> Future for WriteAll<'_, W> where
W: AsyncWrite + Unpin + ?Sized, type Output = Result<(), Error>;
where
Self: Unpin,
W: AsyncWrite + Unpin + ?Sized, type Output = Result<(), Error>;
Write data into this object. Read more
sourcefn write_all_vectored(
&'a mut self,
bufs: &'a mut [IoSlice<'a>]
) -> WriteAllVectored<'a, Self>ⓘNotable traits for WriteAllVectored<'_, W>impl<'_, W> Future for WriteAllVectored<'_, W> where
W: AsyncWrite + Unpin + ?Sized, type Output = Result<(), Error>;
where
Self: Unpin,
fn write_all_vectored(
&'a mut self,
bufs: &'a mut [IoSlice<'a>]
) -> WriteAllVectored<'a, Self>ⓘNotable traits for WriteAllVectored<'_, W>impl<'_, W> Future for WriteAllVectored<'_, W> where
W: AsyncWrite + Unpin + ?Sized, type Output = Result<(), Error>;
where
Self: Unpin,
W: AsyncWrite + Unpin + ?Sized, type Output = Result<(), Error>;
Attempts to write multiple buffers into this writer. Read more
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more