Type Definition aitch::BodyStream[][src]

type BodyStream = Box<Stream<Item = Bytes, Error = Error> + Send>;

A streaming body, which can be used in a HTTP request or response.

This is a simple type alias for a boxed futures::Stream, which yields chunks of bytes::Bytes, representing a streaming HTTP request/response's body.

All types that can be used as a HTTP request/response's body in aitch handlers can be converted to/from this type using the Body trait.

Most applications will not need to use this type directly, but will instead make use of it through the types for which Body is implemented (such as (), String, Vec<u8>).

Trait Implementations

impl Body for BodyStream
[src]

Consume a [BodyStream] and return a future which resolves to Self. Read more

Consume Self and returns a [BodyStream]. Read more

Convenience function to convert from one type implementing Body to another.

impl Handler<BodyStream> for SimpleRouter
[src]

The Responder type returned by this Handler.

Handles an incoming HTTP request, returning a Responder describing a HTTP response.