pub trait Validator<Data> {
type Error;
// Required methods
fn validate(data: &Data) -> Result<(), Self::Error>;
fn constraint_type() -> ConstraintType;
}
Required Associated Types§
Required Methods§
fn validate(data: &Data) -> Result<(), Self::Error>
fn constraint_type() -> ConstraintType
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.