fn check_datatype_scalar<T>(
    property_name: &PropertyName,
    property_value: &str,
    min: &Option<String>,
    max: &Option<String>,
) -> ValidationResult<T>
where
    T: FromStr + std::cmp::PartialOrd + Display + Copy,
{
    // check if config_value fits datatype
    let val: T = parse::<T>(property_name, property_value)?;
    // check min bound
    check_bound(property_name, val, min, min_bound)?;
    // check max bound
    check_bound(property_name, val, max, max_bound)?;

    Ok(val)
}
/// Returns the provided scalar parameter value of type T (i16, i32, i64, f32, f62-..) if no parsing errors appear
///
/// # Arguments
///
/// * `property_name` - name of the property
/// * `property_value` - the value belonging to the property to be validated
/// * `min` - minimum value specified
/// * `max` - maximum value specified
///
Returns the provided scalar parameter value of type T (i16, i32, i64, f32, f62-..) if no parsing errors appear
Returns the provided scalar parameter value of type T ( i16 i32 i64 f32 f62 - .. ) if no parsing errors appear
fn check_datatype_scalar<T>(
    property_name: &PropertyName,
    property_value: &str,
    min: &Option<String>,
    max: &Option<String>,
) -> ValidationResult<T>
where
    T: FromStr + std::cmp::PartialOrd + Display + Copy,
{
    // check if config_value fits datatype
    let val: T = parse::<T>(property_name, property_value)?;
    // check min bound
    check_bound(property_name, val, min, min_bound)?;
    // check max bound
    check_bound(property_name, val, max, max_bound)?;
    Ok(val)
}
fn check_datatype_scalar < T > ( property_name : & PropertyName , property_value : & str , min : & Option < String > , max : & Option < String > , ) -> ValidationResult < T > where T : FromStr + std :: cmp :: PartialOrd + Display + Copy , { // check if config_value fits datatype let val : T = parse :: < T > ( property_name , property_value ) ? ; // check min bound check_bound ( property_name , val , min , min_bound ) ? ; // check max bound check_bound ( property_name , val , max , max_bound ) ? ; Ok ( val ) }
Returns the provided scalar parameter value of type T (i16, i32, i64, f32, f62-..) if no parsing errors appear
Returns the provided scalar parameter value of type T ( i16 i32 i64 f32 f62 - .. ) if no parsing errors appear
property_name
&PropertyName
property_value
&str
min
&Option<String>
max
&Option<String>