pub enum SendBody<W> {
Close(W),
ContentLen(ContentLenWrite<W>),
Chunked(ChunkedWrite<W>),
}Variants§
Implementations§
source§impl<W> SendBody<W>where
W: Write,
impl<W> SendBody<W>where
W: Write,
pub fn new(body_type: BodyType, output: W) -> SendBody<W>
pub fn is_complete(&self) -> bool
pub fn needs_close(&self) -> bool
pub async fn finish(&mut self) -> Result<(), Error<W::Error>>where
W: Write,
pub fn as_raw_writer(&mut self) -> &mut W
pub fn release(self) -> W
Trait Implementations§
source§impl<W> Write for SendBody<W>where
W: Write,
impl<W> Write for SendBody<W>where
W: Write,
source§async fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error>
async fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error>
Write a buffer into this writer, returning how many bytes were written. Read more
Auto Trait Implementations§
impl<W> Freeze for SendBody<W>where
W: Freeze,
impl<W> RefUnwindSafe for SendBody<W>where
W: RefUnwindSafe,
impl<W> Send for SendBody<W>where
W: Send,
impl<W> Sync for SendBody<W>where
W: Sync,
impl<W> Unpin for SendBody<W>where
W: Unpin,
impl<W> UnwindSafe for SendBody<W>where
W: UnwindSafe,
Blanket Implementations§
source§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