Struct tsukuyomi::error::Error

source ·
pub struct Error(_);
Expand description

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

Implementations

Creates an Error from the specified value implementing HttpError.

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 true if this error is a critical error.

Returns the representation as HttpError of this error value by reference.

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

Deconstructs self into inner error representation.

Attempts to downcast this error value into the specified concrete type.

Attempts to downcast this error value to the specified concrete type by reference.

Attempts to downcast this error value to the specified concrete type by reference.

Returns true if the type of inner error value is equal to T.

Trait Implementations

Formats the value using the given formatter. Read more
Converts to this type from the input type.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.