pub struct BodyEncode<IO: AsyncWrite + Unpin> { /* private fields */ }
Implementations§
Source§impl<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)
pub fn from_headers(headers: &HeaderMap, transport: IO) -> Result<Self>
Trait Implementations§
Source§impl<IO: AsyncWrite + Unpin> AsyncWrite for BodyEncode<IO>
impl<IO: AsyncWrite + Unpin> AsyncWrite for BodyEncode<IO>
Source§fn 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 moreSource§fn 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
Auto Trait Implementations§
impl<IO> Freeze for BodyEncode<IO>where
IO: Freeze,
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> Unpin for BodyEncode<IO>
impl<IO> UnwindSafe for BodyEncode<IO>where
IO: UnwindSafe,
Blanket Implementations§
Source§impl<W> AsyncWriteExt for Wwhere
W: AsyncWrite + ?Sized,
impl<W> AsyncWriteExt for Wwhere
W: AsyncWrite + ?Sized,
Source§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 moreSource§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
.Source§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 moreSource§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