Trait DetailedError

Source
pub trait DetailedError:
    StdError
    + ResponseError
    + Serialize {
    // Required method
    fn error_code(&self) -> Cow<'static, str>;
}
Expand description

Error trait which internal errors must implement such that it can be transformed to a complete JSON error response.

Required Methods§

Source

fn error_code(&self) -> Cow<'static, str>

Identifying name of the error.

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§