Skip to main content

parse_micros

Function parse_micros 

Source
pub fn parse_micros(amount: &str) -> Option<Micros>
Expand description

A decimal string as millionths, or None when it is not one.

Integer-only: "3.5" is 3_500_000, not a float that might be 3.4999999. More than six fractional digits is a price this format cannot represent exactly, so it is refused rather than rounded behind the operator’s back.