Trait attohttpc::body::Body[][src]

pub trait Body {
    fn kind(&mut self) -> IoResult<BodyKind>;
fn write<W: Write>(&mut self, writer: W) -> IoResult<()>; fn content_type(&mut self) -> IoResult<Option<String>> { ... } }

A generic rewindable request body

Required methods

fn kind(&mut self) -> IoResult<BodyKind>[src]

Determine the kind of the request body

fn write<W: Write>(&mut self, writer: W) -> IoResult<()>[src]

Write out the request body into the given writer

This method can be called multiple times if a request is redirected.

Loading content...

Provided methods

fn content_type(&mut self) -> IoResult<Option<String>>[src]

Gets the content type this body is tied to if it has one.

Loading content...

Implementors

impl Body for Empty[src]

impl Body for File[src]

impl Body for Multipart<'_>[src]

impl<B: AsRef<[u8]>> Body for Bytes<B>[src]

impl<B: AsRef<str>> Body for Text<B>[src]

impl<B: Serialize> Body for Json<B>[src]

Loading content...