validate_positive_number

Function validate_positive_number 

Source
pub fn validate_positive_number<T>(value: T) -> SubXResult<()>
where T: PartialOrd + Default + Display + Copy,
Expand description

Validate that a number is positive.

§Arguments

  • value - The number to validate

§Errors

Returns error if the number is not positive.