Struct httpbis::Response [−][src]
pub struct Response(pub HttpFutureSend<(Headers, HttpPartStream)>);
Convenient wrapper around async HTTP response future/stream
Methods
impl Response
[src]
impl Response
pub fn new<F>(future: F) -> Response where
F: Future<Item = (Headers, HttpPartStream), Error = Error> + Send + 'static,
[src]
pub fn new<F>(future: F) -> Response where
F: Future<Item = (Headers, HttpPartStream), Error = Error> + Send + 'static,
pub fn headers_and_stream(headers: Headers, stream: HttpPartStream) -> Response
[src]
pub fn headers_and_stream(headers: Headers, stream: HttpPartStream) -> Response
pub fn headers_and_bytes_stream<S>(headers: Headers, content: S) -> Response where
S: Stream<Item = Bytes, Error = Error> + Send + 'static,
[src]
pub fn headers_and_bytes_stream<S>(headers: Headers, content: S) -> Response where
S: Stream<Item = Bytes, Error = Error> + Send + 'static,
pub fn headers(headers: Headers) -> Response
[src]
pub fn headers(headers: Headers) -> Response
Create a response with only headers
pub fn headers_and_bytes<B: Into<Bytes>>(
header: Headers,
content: B
) -> Response
[src]
pub fn headers_and_bytes<B: Into<Bytes>>(
header: Headers,
content: B
) -> Response
Create a response with headers and response body
pub fn message(message: SimpleHttpMessage) -> Response
[src]
pub fn message(message: SimpleHttpMessage) -> Response
pub fn not_found_404() -> Response
[src]
pub fn not_found_404() -> Response
pub fn redirect_302(location: &str) -> Response
[src]
pub fn redirect_302(location: &str) -> Response
pub fn from_stream<S>(stream: S) -> Response where
S: Stream<Item = HttpStreamPart, Error = Error> + Send + 'static,
[src]
pub fn from_stream<S>(stream: S) -> Response where
S: Stream<Item = HttpStreamPart, Error = Error> + Send + 'static,
pub fn err(err: Error) -> Response
[src]
pub fn err(err: Error) -> Response
pub fn into_stream_flag(self) -> HttpFutureStreamSend<HttpStreamPart>
[src]
pub fn into_stream_flag(self) -> HttpFutureStreamSend<HttpStreamPart>
pub fn into_stream(self) -> HttpFutureStreamSend<HttpStreamPartContent>
[src]
pub fn into_stream(self) -> HttpFutureStreamSend<HttpStreamPartContent>
pub fn into_part_stream(self) -> HttpPartStream
[src]
pub fn into_part_stream(self) -> HttpPartStream
pub fn collect(self) -> HttpFutureSend<SimpleHttpMessage>
[src]
pub fn collect(self) -> HttpFutureSend<SimpleHttpMessage>