#[derive(Debug, Clone, PartialEq, Eq)]
#[stable(feature = "rust1", since = "1.0.0")]
pub struct ParseIntError {
- /// Stores the cause of parsing an integer failing
- pub kind: IntErrorKind,
+ kind: IntErrorKind,
}
/// Enum to store the various types of errors that can cause parsing an integer to fail.
}
impl ParseIntError {
+ /// Outputs the detailed cause of parsing an integer failing.
+ pub fn kind(self) -> IntErrorKind {
+ self.kind
+ }
#[unstable(feature = "int_error_internals",
reason = "available through Error trait and this method should \
not be exposed publicly",