pub trait HttpResponse {
// Required method
fn status_code(&self) -> StatusCode;
// Provided method
fn append_headers(&self, headers: &mut HeaderMap<HeaderValue>) { ... }
}Expand description
Trait representing additional information for constructing an HTTP response.
This trait is used as a helper to define the implementation of Responder.
Required Methods§
Sourcefn status_code(&self) -> StatusCode
fn status_code(&self) -> StatusCode
Returns a HTTP status code.
Provided Methods§
Sourcefn append_headers(&self, headers: &mut HeaderMap<HeaderValue>)
fn append_headers(&self, headers: &mut HeaderMap<HeaderValue>)
Append header values to given header map.