pub enum ParseErrorInternal {
FailedToParse(ParseError),
RegexError(InvalidRegexError),
}Expand description
An internal error type used during the parsing process. It distinguishes between a general parsing failure and a regex-specific issue.
Variants§
FailedToParse(ParseError)
Wraps a public ParseError, representing a standard parsing failure.
RegexError(InvalidRegexError)
An error indicating that a regular expression was invalid during parsing. This signals a bug in the library’s metadata.
Implementations§
Source§impl ParseErrorInternal
impl ParseErrorInternal
Sourcepub fn into_public(self) -> ParseError
pub fn into_public(self) -> ParseError
Converts an internal parsing error into its public-facing ParseError.
If the error is a RegexError, this method will panic, enforcing that the
library’s metadata must be valid.
Trait Implementations§
Source§impl Debug for ParseErrorInternal
impl Debug for ParseErrorInternal
Source§impl Display for ParseErrorInternal
impl Display for ParseErrorInternal
Source§impl Error for ParseErrorInternal
impl Error for ParseErrorInternal
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<InvalidRegexError> for ParseErrorInternal
impl From<InvalidRegexError> for ParseErrorInternal
Source§fn from(source: InvalidRegexError) -> Self
fn from(source: InvalidRegexError) -> Self
Converts to this type from the input type.
Source§impl From<ParseError> for ParseErrorInternal
impl From<ParseError> for ParseErrorInternal
Source§fn from(source: ParseError) -> Self
fn from(source: ParseError) -> Self
Converts to this type from the input type.
Source§impl From<ParseErrorInternal> for GetExampleNumberErrorInternal
impl From<ParseErrorInternal> for GetExampleNumberErrorInternal
Source§fn from(value: ParseErrorInternal) -> Self
fn from(value: ParseErrorInternal) -> Self
Converts an internal parsing error into an internal “get example number” error. This is used to propagate errors within the library’s logic.
Source§impl From<ParseErrorInternal> for InvalidNumberErrorInternal
impl From<ParseErrorInternal> for InvalidNumberErrorInternal
Source§fn from(value: ParseErrorInternal) -> Self
fn from(value: ParseErrorInternal) -> Self
Converts an internal parsing error into an internal “invalid number” error.
Source§impl PartialEq for ParseErrorInternal
impl PartialEq for ParseErrorInternal
impl StructuralPartialEq for ParseErrorInternal
Auto Trait Implementations§
impl Freeze for ParseErrorInternal
impl RefUnwindSafe for ParseErrorInternal
impl Send for ParseErrorInternal
impl Sync for ParseErrorInternal
impl Unpin for ParseErrorInternal
impl UnwindSafe for ParseErrorInternal
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more