Trait finchers::Responder
[−]
[src]
pub trait Responder { type Body: IntoBody; fn status(&self) -> StatusCode { ... } fn body(&mut self) -> Option<Self::Body> { ... } fn headers(&self, &mut Headers) { ... } fn cookies(&self, &mut Cookies) { ... } }
Abstrcution of types converted into a raw HTTP response.
Associated Types
Provided Methods
fn status(&self) -> StatusCode
Returns the status code of the HTTP response
The default value is 200 OK
.
fn body(&mut self) -> Option<Self::Body>
Returns the instance of response body, if available.
The default value is None
.
fn headers(&self, &mut Headers)
Add additional headers to the response.
By default, this method has no affect to the HTTP response.
Add additional Cookie entries to the response.
By default, this method has no affect to the HTTP response.
Implementations on Foreign Types
impl Responder for ()
[src]
Implementors
impl Responder for StringResponder type Body = Cow<'static, str>;
impl<E: ErrorResponder> Responder for E type Body = String;