pub trait ValidationPolicyReal: ValidationPolicy<Value: RawRealTrait, Error = <<Self as ValidationPolicy>::Value as RawScalarTrait>::ValidationErrors> {
const PRECISION: u32;
}
Expand description
A marker for policies that apply to real types.
This trait refines the generic ValidationPolicy
for types that implement
RawRealTrait
. It adds two key constraints:
- It associates a
const PRECISION
with the policy, essential for backends likerug
. - It enforces that the policy’s
Error
type must be the same as the canonicalValidationErrors
type 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.