pub enum Error {
Show 17 variants
ParseError,
UnclosedOpenParen,
InvalidRepeat,
RecursionExceeded,
LookBehindNotConst,
TrailingBackslash,
InvalidEscape,
UnclosedUnicodeName,
InvalidHex,
InvalidCodepointValue,
InvalidClass,
UnknownFlag,
NonUnicodeUnsupported,
InvalidBackref,
InnerError(Error),
StackOverflow,
BacktrackLimitExceeded,
// some variants omitted
}
Expand description
An error for the result of compiling or running a regex.
Variants§
ParseError
General parsing error
UnclosedOpenParen
Opening parenthesis without closing parenthesis, e.g. (a|b
InvalidRepeat
Invalid repeat syntax
RecursionExceeded
Pattern too deeply nested
LookBehindNotConst
Look-behind assertion without constant size
TrailingBackslash
Backslash without following character
InvalidEscape
Invalid escape
UnclosedUnicodeName
Unicode escape not closed
InvalidHex
Invalid hex escape
InvalidCodepointValue
Invalid codepoint for hex or unicode escape
InvalidClass
Invalid character class
UnknownFlag
Unknown group flag
NonUnicodeUnsupported
Disabling Unicode not supported
InvalidBackref
Invalid back reference
InnerError(Error)
Regex crate error
StackOverflow
Max stack size exceeded for backtracking while executing regex.
BacktrackLimitExceeded
Max limit for backtracking count exceeded while executing the regex.
Configure using
RegexBuilder::backtrack_limit
.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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()
impl StructuralPartialEq for Error
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnwindSafe for Error
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