Skip to main content

AsStatusError

Trait AsStatusError 

Source
pub trait AsStatusError<E>
where E: Serialize + Debug + PartialEq + Clone + JsonSchema + for<'de> Deserialize<'de>,
{ // Required method fn as_status_error(&self) -> E; }
Expand description

The AsStatusError trait is used to convert a resource into a status error.

This way a user can convert control how the errors that are shown in the status objects are shown to the user.

Required Methods§

Source

fn as_status_error(&self) -> E

Converts the self into a status error.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§