pub enum HandleValidationError {
None,
Bool(bool),
Message(String),
Handler(Arc<dyn Fn(&str) -> String + Send + Sync>),
}Expand description
How to handle validation errors.
Variants§
None
Don’t handle errors (re-raise them).
Bool(bool)
Return a generic error message.
Message(String)
Return a specific error message.
Handler(Arc<dyn Fn(&str) -> String + Send + Sync>)
Use a custom function to handle the error.
Trait Implementations§
Source§impl Clone for HandleValidationError
impl Clone for HandleValidationError
Source§fn clone(&self) -> HandleValidationError
fn clone(&self) -> HandleValidationError
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for HandleValidationError
impl Debug for HandleValidationError
Auto Trait Implementations§
impl Freeze for HandleValidationError
impl !RefUnwindSafe for HandleValidationError
impl Send for HandleValidationError
impl Sync for HandleValidationError
impl Unpin for HandleValidationError
impl !UnwindSafe for HandleValidationError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more