Struct anterofit::net::body::Readable
[−]
[src]
pub struct Readable<R> { pub readable: R, pub content_type: Option<Mime>, // some fields omitted }
The result of serializing the request body, ready to be sent over the network.
Fields
readable: R
The inner Read
impl which will be copied into the request body.
content_type: Option<Mime>
The MIME type of the request body, if applicable.
Methods
impl<R: Read> Readable<R>
[src]
fn new_ok<C: Into<Option<Mime>>>(readable: R, content_type: C) -> Result<Self>
Create a new Readable
wrapped in ::Result::Ok
for convenience.
fn new<C: Into<Option<Mime>>>(readable: R, content_type: C) -> Self
Create a new Readable
with the given Read
and MIME type (can be an Option
or a bare
Mime
value).