parse_quantity

Function parse_quantity 

Source
pub fn parse_quantity(value: &str, field_name: &str) -> Result<Quantity>
Expand description

Parses a decimal string into a Quantity.

ยงErrors

Returns an error if the string cannot be parsed into a valid quantity.