Trait finchers::responder::ErrorResponder
[−]
[src]
pub trait ErrorResponder: Error { fn status(&self) -> StatusCode { ... } fn message(&self) -> Option<String> { ... } }
Abstruction of an "error" response.
This trait is useful for defining the HTTP response of types
which implements the Error
trait.
If the own error response (like JSON body) is required, use
Responder
directly.
Provided Methods
fn status(&self) -> StatusCode
Returns the status code of the HTTP response.
fn message(&self) -> Option<String>
Returns the message string of the HTTP response.
Implementations on Foreign Types
impl ErrorResponder for FromUtf8Error
[src]
impl ErrorResponder for ParseError
[src]
Implementors
impl ErrorResponder for FormError
impl ErrorResponder for JsonError
impl ErrorResponder for NoRoute
impl ErrorResponder for StringBodyError
impl ErrorResponder for HttpError