Skip to main content

parse_number_unit

Function parse_number_unit 

Source
pub fn parse_number_unit(
    value_str: &str,
    type_spec: &TypeSpecification,
) -> Result<Value, String>
Expand description

Parse a “number unit” string into a Scale or Ratio value according to the type. Caller must have obtained the TypeSpecification via unit_index from the unit in the string.