pub struct GenericErrorWithCause {
    pub error: Box<dyn Error + Send + Sync>,
    pub cause: ErrorCause,
}
Expand description

An error that has an attached cause that blames either the client or the server for its occurrence. You can convert any error into this with .into() or ?, which will set the cause to the server by default, resulting in a 500 Internal Server Error HTTP status code. If this isn’t what you want, you’ll need to initialize this explicitly.

Fields

error: Box<dyn Error + Send + Sync>

The underlying error.

cause: ErrorCause

The cause of the error.

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

Converts to this type from the input type.

Returns the argument unchanged.

Calls U::from(self).

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

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.