pub struct NumberConstraint {
pub max: Option<i32>,
pub min: Option<i32>,
}
Expand description
Number constraint config for applying constraints onto some number
Fields§
§max: Option<i32>
§min: Option<i32>
Trait Implementations§
Source§impl<T> Constraint<T> for NumberConstraint
Implementing method to apply constraints on numbers
impl<T> Constraint<T> for NumberConstraint
Implementing method to apply constraints on numbers
Source§fn validate(&self, data: &T) -> ConstraintResult
fn validate(&self, data: &T) -> ConstraintResult
Validates data to make sure it follows constraints
Auto Trait Implementations§
impl Freeze for NumberConstraint
impl RefUnwindSafe for NumberConstraint
impl Send for NumberConstraint
impl Sync for NumberConstraint
impl Unpin for NumberConstraint
impl UnwindSafe for NumberConstraint
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more