Type std::num::ParseIntError

Overview

Protocols

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

Write why an integer could not be parsed.

Examples

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

assert_eq!(text, "invalid digit found in string");
protocol DEBUG_FMT
format!("{:?}", value)

Write a debug representation of why an integer could not be parsed.

Examples

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

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