Type std::num::ParseFloatError

Overview

Protocols

protocol DISPLAY_FMT
format!("{}", value)

Write why a float could not be parsed.

Examples

let text = if let Err(error) = f64::parse("x") {
   format!("{error}")
} else {
   ""
};

assert_eq!(text, "invalid float literal");
protocol DEBUG_FMT
format!("{:?}", value)

Write a debug representation of why a float could not be parsed.

Examples

let text = if let Err(error) = f64::parse("x") {
   format!("{error:?}")
} else {
   ""
};

assert!(text.starts_with("ParseFloatError"));