ValidationPolicyComplex

Trait ValidationPolicyComplex 

Source
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:

  1. It associates a const PRECISION with the policy, essential for backends like rug.
  2. It enforces that the policy’s Error type must be the same as the canonical ValidationErrors 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.

Implementors§

Source§

impl<P> ValidationPolicyComplex for DebugValidationPolicy<P>

Source§

const PRECISION: u32 = P::PRECISION

Source§

impl<RawComplex: RawComplexTrait, const PRECISION: u32> ValidationPolicyComplex for StrictFinitePolicy<RawComplex, PRECISION>
where StrictFinitePolicy<RawComplex, PRECISION>: ValidationPolicy<Value = RawComplex, Error = <RawComplex as RawScalarTrait>::ValidationErrors>,

Source§

const PRECISION: u32 = PRECISION