Skip to main content

ErrorHandler

Trait ErrorHandler 

Source
pub trait ErrorHandler<V> {
    type Response: IntoResponse;

    // Required method
    fn handle_error(
        &self,
        error: Error<V>,
    ) -> impl Future<Output = Self::Response> + Send + Sync;
}
Expand description

The error handler for the validation errors.

Required Associated Types§

Source

type Response: IntoResponse

Whatever the handler should respond with.

Required Methods§

Source

fn handle_error( &self, error: Error<V>, ) -> impl Future<Output = Self::Response> + Send + Sync

Handler the validation error.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§