Struct capnp_futures::serialize_packed::PackedWrite
source · pub struct PackedWrite<W>where
W: AsyncWrite + Unpin,{ /* private fields */ }
Expand description
An AsyncWrite
wrapper that packs any data passed into it.
Implementations§
Trait Implementations§
source§impl<W> AsyncWrite for PackedWrite<W>where
W: AsyncWrite + Unpin,
impl<W> AsyncWrite for PackedWrite<W>where
W: AsyncWrite + Unpin,
source§fn poll_write(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
inbuf: &[u8]
) -> Poll<Result<usize, Error>>
fn poll_write( self: Pin<&mut Self>, cx: &mut Context<'_>, inbuf: &[u8] ) -> Poll<Result<usize, Error>>
Attempt to write bytes from
buf
into the object. Read moresource§fn poll_flush(
self: Pin<&mut Self>,
cx: &mut Context<'_>
) -> Poll<Result<(), Error>>
fn poll_flush( self: Pin<&mut Self>, cx: &mut Context<'_> ) -> Poll<Result<(), Error>>
Attempt to flush the object, ensuring that any buffered data reach
their destination. Read more
Auto Trait Implementations§
impl<W> RefUnwindSafe for PackedWrite<W>where
W: RefUnwindSafe,
impl<W> Send for PackedWrite<W>where
W: Send,
impl<W> Sync for PackedWrite<W>where
W: Sync,
impl<W> Unpin for PackedWrite<W>
impl<W> UnwindSafe for PackedWrite<W>where
W: UnwindSafe,
Blanket Implementations§
§impl<W> AsyncWriteExt for Wwhere
W: AsyncWrite + ?Sized,
impl<W> AsyncWriteExt for Wwhere
W: AsyncWrite + ?Sized,
§fn flush(&mut self) -> Flush<'_, Self>where
Self: Unpin,
fn flush(&mut self) -> Flush<'_, Self>where
Self: Unpin,
Creates a future which will entirely flush this
AsyncWrite
. Read more§fn close(&mut self) -> Close<'_, Self>where
Self: Unpin,
fn close(&mut self) -> Close<'_, Self>where
Self: Unpin,
Creates a future which will entirely close this
AsyncWrite
.§fn write<'a>(&'a mut self, buf: &'a [u8]) -> Write<'a, Self>where
Self: Unpin,
fn write<'a>(&'a mut self, buf: &'a [u8]) -> Write<'a, Self>where
Self: Unpin,
Creates a future which will write bytes from
buf
into the object. Read more§fn write_vectored<'a>(
&'a mut self,
bufs: &'a [IoSlice<'a>]
) -> WriteVectored<'a, Self>where
Self: Unpin,
fn write_vectored<'a>(
&'a mut self,
bufs: &'a [IoSlice<'a>]
) -> WriteVectored<'a, Self>where
Self: Unpin,
Creates a future which will write bytes from
bufs
into the object using vectored
IO operations. Read moresource§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more