Parsing 将字符串解析为f64和i64

Parsing 将字符串解析为f64和i64,parsing,numbers,rust,Parsing,Numbers,Rust,我似乎无法从官方文件中找到任何东西。我可以看到,有多种老方法可以做到这一点(int::parse_bytes和f32::from_string),但这两种方法都不推荐使用。在1.0中执行此操作的方式是什么?&str.parse::().unwrap()->“type” &str.parse::< "type" >().unwrap() -> "type"

我似乎无法从官方文件中找到任何东西。我可以看到,有多种老方法可以做到这一点(
int::parse_bytes
f32::from_string
),但这两种方法都不推荐使用。在1.0中执行此操作的方式是什么?

&str.parse::<“type”>().unwrap()->“type”
 &str.parse::< "type" >().unwrap() -> "type"