Trait ApiError

Source
pub trait ApiError:
    Debug
    + Display
    + Serialize {
    // Required methods
    fn from_error(e: Error) -> Self;
    fn status_code(&self) -> StatusCode;
}
Expand description

The error that is sent if something goes wrong while responding to a request.

§Panics

If deserialization or serialization failes this will result in a panic

Required Methods§

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§