Skip to main content

parse_decimal_native

Function parse_decimal_native 

Source
fn parse_decimal_native<T: DecimalType>(
    s: &str,
    scale: i8,
) -> Result<(T::Native, usize), DecimalParseError>
Expand description

Parses s as a decimal with the given scale into the native type of T, checking only that the result fits the native type (not the precision), and returns it with an upper bound on its number of decimal digits.

See parse_decimal for the accepted syntax and rounding behaviour.