#[non_exhaustive]pub enum ParseErrorKind {
Show 26 variants
UnknownToken,
LexErrorWithMessage(LexErrorMsg),
KeywordAfterLet(String),
KeywordAfterColon(String),
NonAsciiIdentAfterColon(char),
GroupNameTooLong(usize),
UnexpectedKeyword(String),
Deprecated(DeprecationError),
Expected(&'static str),
LeftoverTokens,
ExpectedToken(Token),
RangeIsNotIncreasing,
RangeLeadingZeroesVariableLength,
UnallowedNot,
UnallowedMultiNot(usize),
LonePipe,
LetBindingExists,
MissingLetKeyword,
InvalidEscapeInStringAt(usize),
CharString(CharStringError),
CharClass(CharClassError),
InvalidCodePoint,
Number(NumberError),
Repetition(RepetitionError),
MultipleStringsInTestCase,
RecursionLimit,
}
Expand description
An error kind (without a span) than can occur only during parsing
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
UnknownToken
LexErrorWithMessage(LexErrorMsg)
KeywordAfterLet(String)
KeywordAfterColon(String)
NonAsciiIdentAfterColon(char)
GroupNameTooLong(usize)
UnexpectedKeyword(String)
Deprecated(DeprecationError)
Expected(&'static str)
LeftoverTokens
ExpectedToken(Token)
RangeIsNotIncreasing
RangeLeadingZeroesVariableLength
UnallowedNot
UnallowedMultiNot(usize)
LonePipe
LetBindingExists
MissingLetKeyword
InvalidEscapeInStringAt(usize)
CharString(CharStringError)
CharClass(CharClassError)
InvalidCodePoint
Number(NumberError)
Repetition(RepetitionError)
MultipleStringsInTestCase
RecursionLimit
Implementations§
Source§impl ParseErrorKind
impl ParseErrorKind
Sourcepub fn at(self, span: Span) -> ParseError
pub fn at(self, span: Span) -> ParseError
Creates a ParseError
from this error kind, and a Span
indicating
where the error occurred.
Trait Implementations§
Source§impl Clone for ParseErrorKind
impl Clone for ParseErrorKind
Source§fn clone(&self) -> ParseErrorKind
fn clone(&self) -> ParseErrorKind
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ParseErrorKind
impl Debug for ParseErrorKind
Source§impl Display for ParseErrorKind
impl Display for ParseErrorKind
Source§impl Error for ParseErrorKind
impl Error for ParseErrorKind
1.30.0 · 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<CharClassError> for ParseErrorKind
impl From<CharClassError> for ParseErrorKind
Source§fn from(e: CharClassError) -> Self
fn from(e: CharClassError) -> Self
Converts to this type from the input type.
Source§impl From<DeprecationError> for ParseErrorKind
impl From<DeprecationError> for ParseErrorKind
Source§fn from(e: DeprecationError) -> Self
fn from(e: DeprecationError) -> Self
Converts to this type from the input type.
Source§impl From<NumberError> for ParseErrorKind
impl From<NumberError> for ParseErrorKind
Source§fn from(e: NumberError) -> Self
fn from(e: NumberError) -> Self
Converts to this type from the input type.
Source§impl From<RepetitionError> for ParseErrorKind
impl From<RepetitionError> for ParseErrorKind
Source§fn from(e: RepetitionError) -> Self
fn from(e: RepetitionError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for ParseErrorKind
impl PartialEq for ParseErrorKind
impl Eq for ParseErrorKind
impl StructuralPartialEq for ParseErrorKind
Auto Trait Implementations§
impl Freeze for ParseErrorKind
impl RefUnwindSafe for ParseErrorKind
impl Send for ParseErrorKind
impl Sync for ParseErrorKind
impl Unpin for ParseErrorKind
impl UnwindSafe for ParseErrorKind
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