Struct salt::Response
[−]
[src]
pub struct Response { /* fields omitted */ }
Represents an HTTP response.
Methods
impl Response
[src]
fn new() -> Response
fn with<R: Responder>(responder: R) -> Response
fn status(&self) -> StatusCode
Get the status.
fn with_status(self, status_code: StatusCode) -> Self
Set the status and move the Response
.
fn body(self) -> Body
Take the body.
fn with_body<B: Into<Body>>(self, body: B) -> Self
Set the body and move the Response
.
fn with_header<H: Header>(self, header: H) -> Self
Set a Header
and move the Response
.
Trait Implementations
impl Default for Response
[src]
impl IntoFuture for Response
[src]
type Item = Response
The item that the future may resolve with.
type Error = Error
The error that the future may resolve with.
type Future = FutureResult<Self::Item, Self::Error>
The future that this type can be converted into.
fn into_future(self) -> Self::Future
Consumes this object and produces a future.