Expand description
This crate extends how num_rational::Ratio<T> can be converted
from a string specifically by allowing decimal notation with the
ability to constrain the minimum and maximum number of fractional
digits allowed.
Modules§
- rational
rational - Enables deserialization of strings in decimal or fractional format into
rational::Rational<T>.
Structs§
- MinMax
- An ordered pair whose first value is <= to the second.
Enums§
- From
DecStr Err - The error returned when parsing a string in decimal notation into
a
num_rational::Ratio<T>. - From
StrErr - The error returned when parsing a string in decimal or
rational notation into a
num_rational::Ratio<T>.
Functions§
- to_
dec_ string - Returns a
Stringrepresentingvalin decimal notation withfrac_digit_countfractional digits using normal rounding rules. - try_
from_ dec_ str - Converts a string in decimal notation into a
Ratio<T>. - try_
from_ str - Converts a string in rational or decimal notation into a
Ratio<T>.