pub struct ErrorReporter {
pub enabled: bool,
pub callback: Option<Box<dyn Fn(&ValidationError) + Send + Sync>>,
}
Expand description
Error reporter for validation errors
Fields§
§enabled: bool
Whether to report errors
callback: Option<Box<dyn Fn(&ValidationError) + Send + Sync>>
Error callback
Implementations§
Source§impl ErrorReporter
impl ErrorReporter
Sourcepub fn set_callback<F>(&mut self, callback: F)
pub fn set_callback<F>(&mut self, callback: F)
Set error callback
Sourcepub fn report(&self, error: &ValidationError)
pub fn report(&self, error: &ValidationError)
Report an error
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ErrorReporter
impl !RefUnwindSafe for ErrorReporter
impl Send for ErrorReporter
impl Sync for ErrorReporter
impl Unpin for ErrorReporter
impl !UnwindSafe for ErrorReporter
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