ValidationPolicyReal

Trait ValidationPolicyReal 

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

  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> ValidationPolicyReal for DebugValidationPolicy<P>

Source§

const PRECISION: u32 = P::PRECISION

Source§

impl<RawReal: RawRealTrait, const PRECISION: u32> ValidationPolicyReal for StrictFinitePolicy<RawReal, PRECISION>
where StrictFinitePolicy<RawReal, PRECISION>: ValidationPolicy<Value = RawReal, Error = <RawReal as RawScalarTrait>::ValidationErrors>,

Source§

const PRECISION: u32 = PRECISION