Trait finchers_core::error::HttpError [] [src]

pub trait HttpError: Debug + Display + Send + Sync + 'static {
    fn status_code(&self) -> StatusCode;

    fn append_headers(&self, headers: &mut HeaderMap<HeaderValue>) { ... }
fn as_fail(&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.

Required Methods

Return the HTTP status code associated with this error type.

Provided Methods

Append a set of header values to the header map.

Return the reference to a value of Fail if exists.

Implementations on Foreign Types

impl<L, R> HttpError for Either<L, R> where
    L: HttpError,
    R: HttpError
[src]

[src]

[src]

[src]

Implementors