Trait FloatChecker

Source
pub trait FloatChecker<T: Float> {
    type Error;

    // Required method
    fn check(value: T) -> Result<T, Self::Error>;
}
Expand description

A property checker for a float type.

Required Associated Types§

Source

type Error

A custom error resulting from a violated property check.

Required Methods§

Source

fn check(value: T) -> Result<T, Self::Error>

Checks if a value satisfies a property. The checker is allowed to alter the returned value to be stored (e.g., to apply modulo logic).

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§