Struct tsukuyomi::Error[][src]

pub struct Error { /* fields omitted */ }

A type which holds all kinds of errors occurring in handlers.

Methods

impl Error
[src]

Creates an HTTP error from an error value and an HTTP status code.

Creates an HTTP error representing "404 Not Found".

Creates an HTTP error representing "405 Method Not Allowed".

Creates an HTTP error representing "400 Bad Request" from the provided error value.

Creates an HTTP error representing "500 Internal Server Error", from the provided error value .

Creates a critical error from an error value.

The word "critical" means that the error will not be converted into an HTTP response. If the framework receives this kind of error, it wlll abort the current connection abruptly without sending an HTTP response.

See the documentation at hyper for details.

Returns the representation as HttpError of this error value.

If the value is a criticial error, it will return a None.

Trait Implementations

impl Debug for Error
[src]

Formats the value using the given formatter. Read more

impl<E> From<E> for Error where
    E: HttpError
[src]

Performs the conversion.

Auto Trait Implementations

impl Send for Error

impl Sync for Error