pub trait NumericValue: Copy {
// Required methods
fn check_bounds(
self,
field: &str,
min: Option<f64>,
max: Option<f64>,
gt: Option<f64>,
lt: Option<f64>,
multiple_of: Option<i64>,
) -> Result<(), FieldIssue>;
fn check_positive(self, field: &str) -> Result<(), FieldIssue>;
fn check_non_negative(self, field: &str) -> Result<(), FieldIssue>;
fn check_finite(self, field: &str) -> Result<(), FieldIssue>;
}Expand description
Type-aware numeric validation across integers and floating-point numbers.
Required Methods§
fn check_bounds( self, field: &str, min: Option<f64>, max: Option<f64>, gt: Option<f64>, lt: Option<f64>, multiple_of: Option<i64>, ) -> Result<(), FieldIssue>
fn check_positive(self, field: &str) -> Result<(), FieldIssue>
fn check_non_negative(self, field: &str) -> Result<(), FieldIssue>
fn check_finite(self, field: &str) -> Result<(), FieldIssue>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".