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());

Create a Body stream with an associated sender half.

Useful when wanting to stream chunks from another thread.

Trait Implementations

Values yielded by the Body.

The error type this Body might generate.

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.

Turn this body into a boxed trait object.

Formats the value using the given formatter. Read more

Returns Body::empty().

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.