pub trait ValidationPolicyComplex: ValidationPolicy<Value: RawComplexTrait, Error = <<Self as ValidationPolicy>::Value as RawScalarTrait>::ValidationErrors> {
const PRECISION: u32;
}Expand description
A marker for policies that apply to complex types.
This trait refines the generic ValidationPolicy for types that implement
RawComplexTrait. It adds two key constraints:
- It associates a
const PRECISIONwith the policy, essential for backends likerug. - It enforces that the policy’s
Errortype must be the same as the canonicalValidationErrorstype defined on the raw scalar itself. This architectural choice ensures consistent error handling throughout the library.
Required Associated Constants§
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.