parse_quantity

Function parse_quantity 

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

Converts a textual quantity to a Quantity.

§Errors

Returns an error for the same reasons as parse_price – parsing failure or invalid precision.