[−][src]Trait hyperbole::reply::Reply
A type that can be converted into an http Response.
Required methods
fn into_response(self) -> Response
Perform the conversion.
Provided methods
fn with_status(self, code: StatusCode) -> Response
Change the status code to code
.
use hyper::StatusCode; use hyperbole::{reply::Reply, Response}; let _: Response = "some message" // .with_status(StatusCode::OK);
fn with_header<H: Header>(self, header: H) -> Response
Include a typed header
in the response.
use headers::ContentType; use hyperbole::{reply::Reply, Response}; let _: Response = "some message" // .with_header(ContentType::text());
Implementations on Foreign Types
impl Reply for Error
[src]
fn into_response(self) -> Response
[src]
impl<R: Reply, E: Reply> Reply for Result<R, E>
[src]
fn into_response(self) -> Response
[src]
impl Reply for Infallible
[src]
fn into_response(self) -> Response
[src]
impl Reply for CNil
[src]
fn into_response(self) -> Response
[src]
impl<H: Reply, Tail: Reply> Reply for Coproduct<H, Tail>
[src]
fn into_response(self) -> Response
[src]
impl<T: Reply> Reply for Box<T>
[src]
fn into_response(self) -> Response
[src]
impl<'a, T: ToOwned> Reply for Cow<'a, T> where
&'a T: Reply,
T::Owned: Reply,
[src]
&'a T: Reply,
T::Owned: Reply,