pub trait TypedChecker<T>: Send + Syncwhere
T: Entity,{
// Required method
fn check_and_fix_typed(
&self,
ctx: &UserContext,
entity: &mut T,
status: CheckObjectStatus,
location: &ObjectLocation,
results: &mut CheckResults,
);
// Provided methods
fn required_option<V>(
&self,
value: Option<&V>,
field: &str,
location: &ObjectLocation,
results: &mut CheckResults,
) { ... }
fn required_text(
&self,
value: &str,
field: &str,
location: &ObjectLocation,
results: &mut CheckResults,
) { ... }
fn min_string_length(
&self,
value: &str,
field: &str,
min_len: usize,
location: &ObjectLocation,
results: &mut CheckResults,
) { ... }
fn max_string_length(
&self,
value: &str,
field: &str,
max_len: usize,
location: &ObjectLocation,
results: &mut CheckResults,
) { ... }
}Required Methods§
fn check_and_fix_typed( &self, ctx: &UserContext, entity: &mut T, status: CheckObjectStatus, location: &ObjectLocation, results: &mut CheckResults, )
Provided Methods§
fn required_option<V>( &self, value: Option<&V>, field: &str, location: &ObjectLocation, results: &mut CheckResults, )
fn required_text( &self, value: &str, field: &str, location: &ObjectLocation, results: &mut CheckResults, )
fn min_string_length( &self, value: &str, field: &str, min_len: usize, location: &ObjectLocation, results: &mut CheckResults, )
fn max_string_length( &self, value: &str, field: &str, max_len: usize, location: &ObjectLocation, results: &mut CheckResults, )
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.