#[non_exhaustive]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),
}
Expand description
An error for the result of parsing a regex pattern.
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.
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 Clone for ParseError
impl Clone for ParseError
source§fn clone(&self) -> ParseError
fn clone(&self) -> ParseError
Returns a copy 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 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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)