Skip to main content

parse_amount

Function parse_amount 

Source
pub fn parse_amount(vendor: &str, field: &str, s: &str) -> Result<f64>
Expand description

Parse a monetary field that the wire encodes as a string. A malformed or empty value is a schema error, not a zero balance — silently reporting $0.00 for an error envelope is the failure mode this guards against.