pub enum ParseError {
Show 16 variants
GeneralParseError(String),
UnclosedOpenParen,
InvalidRepeat,
RecursionExceeded,
TrailingBackslash,
InvalidEscape(String),
UnclosedUnicodeName,
InvalidHex,
InvalidCodepointValue,
InvalidClass,
UnknownFlag(String),
NonUnicodeUnsupported,
InvalidBackref,
TargetNotRepeatable,
InvalidGroupName,
InvalidGroupNameBackref(String),
// some variants omitted
}
Expand description
An error for the result of parsing a regex pattern.
Variants§
GeneralParseError(String)
General parsing error
UnclosedOpenParen
Opening parenthesis without closing parenthesis, e.g. (a|b
InvalidRepeat
Invalid repeat syntax
RecursionExceeded
Pattern too deeply nested
TrailingBackslash
Backslash without following character
InvalidEscape(String)
Invalid escape
UnclosedUnicodeName
Unicode escape not closed
InvalidHex
Invalid hex escape
InvalidCodepointValue
Invalid codepoint for hex or unicode escape
InvalidClass
Invalid character class
UnknownFlag(String)
Unknown group flag
NonUnicodeUnsupported
Disabling Unicode not supported
InvalidBackref
Invalid back reference
TargetNotRepeatable
Quantifier on lookaround or other zero-width assertion
InvalidGroupName
Couldn’t parse group name
InvalidGroupNameBackref(String)
Invalid group id in escape sequence
Trait Implementations§
Source§impl Debug for ParseError
impl Debug for ParseError
Auto Trait Implementations§
impl Freeze for ParseError
impl RefUnwindSafe for ParseError
impl Send for ParseError
impl Sync for ParseError
impl Unpin for ParseError
impl UnwindSafe for ParseError
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