pub trait ErrorHandler {
// Required methods
fn handle_error(&self, error: &FormError, context: &ErrorContext);
fn should_log_error(&self, error: &FormError) -> bool;
fn should_report_error(&self, error: &FormError) -> bool;
}Expand description
Error handler trait for custom error handling
Required Methods§
Sourcefn handle_error(&self, error: &FormError, context: &ErrorContext)
fn handle_error(&self, error: &FormError, context: &ErrorContext)
Handle a form error
Sourcefn should_log_error(&self, error: &FormError) -> bool
fn should_log_error(&self, error: &FormError) -> bool
Check if an error should be logged
Sourcefn should_report_error(&self, error: &FormError) -> bool
fn should_report_error(&self, error: &FormError) -> bool
Check if an error should be reported to external services
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".