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]
impl Body for BodyStreamtype Future = FutureResult<BodyStream, Error>
fn from_stream(stream: BodyStream) -> Self::Future[src]
fn from_stream(stream: BodyStream) -> Self::FutureConsume a [BodyStream] and return a future which resolves to Self. Read more
fn into_stream(self) -> BodyStream[src]
fn into_stream(self) -> BodyStreamConsume Self and returns a [BodyStream]. Read more
fn into_body<OtherBody: Body>(self) -> OtherBody::Future[src]
fn into_body<OtherBody: Body>(self) -> OtherBody::FutureConvenience function to convert from one type implementing Body to another.
impl Handler<BodyStream> for SimpleRouter[src]
impl Handler<BodyStream> for SimpleRoutertype Resp = BoxedResponse
The Responder type returned by this Handler.
fn handle(
&self,
req: Request<BodyStream>,
resp: ResponseBuilder
) -> BoxedResponse[src]
fn handle(
&self,
req: Request<BodyStream>,
resp: ResponseBuilder
) -> BoxedResponseHandles an incoming HTTP request, returning a Responder describing a HTTP response.