Trait finchers::error::HttpError [−][src]
pub trait HttpError: Debug + Display + Send + Sync + 'static { fn status_code(&self) -> StatusCode { ... } fn headers(&self, headers: &mut HeaderMap) { ... } fn cause(&self) -> Option<&Fail> { ... } }
Trait representing error values from endpoints.
The types which implements this trait will be implicitly converted to an HTTP response by the runtime.
Provided Methods
fn status_code(&self) -> StatusCode
Return the HTTP status code associated with this error type.
fn headers(&self, headers: &mut HeaderMap)
Append a set of header values to the header map.
fn cause(&self) -> Option<&Fail>
Trait Implementations
Implementations on Foreign Types
impl HttpError for Error
[src]
impl HttpError for Error
fn status_code(&self) -> StatusCode
[src]
fn status_code(&self) -> StatusCode
fn headers(&self, headers: &mut HeaderMap)
[src]
fn headers(&self, headers: &mut HeaderMap)
fn cause(&self) -> Option<&Fail>
[src]
fn cause(&self) -> Option<&Fail>
impl HttpError for Error
[src]
impl HttpError for Error
fn cause(&self) -> Option<&Fail>
[src]
fn cause(&self) -> Option<&Fail>
fn status_code(&self) -> StatusCode
[src]
fn status_code(&self) -> StatusCode
fn headers(&self, headers: &mut HeaderMap)
[src]
fn headers(&self, headers: &mut HeaderMap)
Implementors
impl HttpError for ApplyError
impl HttpError for Never