pub trait Checker: Send + Sync {
// Required methods
fn entity(&self) -> &str;
fn check_and_fix(
&self,
ctx: &UserContext,
record: &mut Record,
location: &ObjectLocation,
results: &mut CheckResults,
);
// Provided methods
fn required(
&self,
record: &Record,
field: &str,
location: &ObjectLocation,
results: &mut CheckResults,
) { ... }
fn min_string_length(
&self,
record: &Record,
field: &str,
min_len: usize,
location: &ObjectLocation,
results: &mut CheckResults,
) { ... }
fn max_string_length(
&self,
record: &Record,
field: &str,
max_len: usize,
location: &ObjectLocation,
results: &mut CheckResults,
) { ... }
}Required Methods§
fn entity(&self) -> &str
fn check_and_fix( &self, ctx: &UserContext, record: &mut Record, location: &ObjectLocation, results: &mut CheckResults, )
Provided Methods§
fn required( &self, record: &Record, field: &str, location: &ObjectLocation, results: &mut CheckResults, )
fn min_string_length( &self, record: &Record, field: &str, min_len: usize, location: &ObjectLocation, results: &mut CheckResults, )
fn max_string_length( &self, record: &Record, field: &str, max_len: usize, location: &ObjectLocation, results: &mut CheckResults, )
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".