try_from_dec_str

Function try_from_dec_str 

Source
pub fn try_from_dec_str<T>(
    val: &str,
    frac_digit_count: &MinMax<usize>,
) -> Result<Ratio<T>, FromDecStrErr<<T as FromStr>::Err>>
where T: Clone + From<u8> + FromStr + Integer + for<'a> Mul<&'a T, Output = T> + Pow<usize, Output = T>,
Expand description

Converts a string in decimal notation into a Ratio<T>.

§Panics

May panic if T implements arithmetic in a way where panics occur on overflow or underflow.

§Errors

Will return FromDecStrErr iff val is not a valid rational number in decimal notation with number of fractional digits inclusively between frac_digit_count.min() and frac_digit_count.max().