Struct async_http_codec::BodyEncode
source · [−]pub struct BodyEncode<IO: AsyncWrite + Unpin> { /* private fields */ }
Implementations
sourceimpl<IO: AsyncWrite + Unpin> BodyEncode<IO>
impl<IO: AsyncWrite + Unpin> BodyEncode<IO>
pub fn new(transport: IO, length: Option<u64>) -> Self
pub fn checkpoint(self) -> (IO, BodyEncodeState)
Trait Implementations
sourceimpl<IO: AsyncWrite + Unpin> AsyncWrite for BodyEncode<IO>
impl<IO: AsyncWrite + Unpin> AsyncWrite for BodyEncode<IO>
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>, cx: &mut Context<'_>) -> Poll<Result<()>>
fn poll_flush(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<()>>
Attempt to flush the object, ensuring that any buffered data reach their destination. Read more
impl<'pin, IO: AsyncWrite + Unpin> Unpin for BodyEncode<IO> where
__BodyEncode<'pin, IO>: Unpin,
Auto Trait Implementations
impl<IO> RefUnwindSafe for BodyEncode<IO> where
IO: RefUnwindSafe,
impl<IO> Send for BodyEncode<IO> where
IO: Send,
impl<IO> Sync for BodyEncode<IO> where
IO: Sync,
impl<IO> UnwindSafe for BodyEncode<IO> where
IO: UnwindSafe,
Blanket Implementations
impl<W> AsyncWriteExt for W where
W: AsyncWrite + ?Sized,
impl<W> AsyncWriteExt for W where
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 mut self, buf: &'a [u8]) -> Write<'a, Self> where
Self: Unpin,
fn write(&'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 mut self,
bufs: &'a [IoSlice<'a>]
) -> WriteVectored<'a, Self> where
Self: Unpin,
fn write_vectored(
&'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 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