Skip to main content

ApiError

Trait ApiError 

Source
pub trait ApiError {
    // Required methods
    fn response_descriptors() -> Vec<ResponseDescriptor>;
    fn into_failure(self) -> Result<OperationFailure, ResponseBuildError>;
}
Expand description

A user-declared operation error with stable transport semantics.

Required Methods§

Source

fn response_descriptors() -> Vec<ResponseDescriptor>

Source

fn into_failure(self) -> Result<OperationFailure, ResponseBuildError>

Converts the declared error into its transport-neutral failure.

§Errors

Returns a response build error when a typed error payload cannot be serialized.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§