pub struct ParseFloatError { /* fields omitted */ }
Expand description
解析浮点数时可以返回的错误。
该错误用作 f32 和 f64 的 FromStr 实现的错误类型。
use std::str::FromStr;
if let Err(e) = f64::from_str("a.12") {
println!("Failed conversion to f64: {}", e);
}
Run
👎 Deprecated since 1.42.0:
use the Display impl or to_string()
🔬 This is a nightly-only experimental API. (
backtrace #53487)
👎 Deprecated since 1.33.0:
replaced by Error::source, which can support downcasting
impl<T> Any for T where
T: 'static + ?Sized,
impl<T, U> Into<U> for T where
U: From<T>,
🔬 This is a nightly-only experimental API. (toowned_clone_into #41263)
recently added