Netdoc: add accessor to error for ParseErrorKind

The kind type was already public, but we didn't give the user any
way to get it.
This commit is contained in:
Nick Mathewson 2022-05-26 13:40:19 -04:00
parent 171aa5ea00
commit 102600e1c7
1 changed files with 5 additions and 0 deletions

View File

@ -417,6 +417,11 @@ impl Error {
self.source = Some(source.into());
self
}
/// Return the [`ParseErrorKind`] of this error.
pub fn parse_error_kind(&self) -> ParseErrorKind {
self.kind
}
}
impl fmt::Display for Error {