Struct happi::hyper::Body [−][src]
#[must_use = "streams do nothing unless polled"]pub struct Body { /* fields omitted */ }
Expand description
A stream of Bytes
, used when receiving bodies.
A good default HttpBody
to use in many
applications.
Note: To read the full body, use body::to_bytes
or body::aggregate
.
Implementations
Create an empty Body
stream.
Example
use hyper::{Body, Request}; // create a `GET /` request let get = Request::new(Body::empty());
Trait Implementations
Attempt to pull out the next data buffer of this stream.
Poll for an optional single HeaderMap
of trailers. Read more
Returns true
when the end of stream has been reached. Read more
Returns the bounds on the remaining length of the stream. Read more
Returns future that resolves to next data chunk, if any.
Returns future that resolves to trailers, if any.
Maps this body’s data value to a different value.
Maps this body’s error value to a different value.
Auto Trait Implementations
impl !RefUnwindSafe for Body
impl !UnwindSafe for Body