[−][src]Enum regex_syntax::ast::ErrorKind  
The type of an error that occurred while building an AST.
Variants
CaptureLimitExceededThe capturing group limit was exceeded.
Note that this represents a limit on the total number of capturing groups in a regex and not necessarily the number of nested capturing groups. That is, the nest limit can be low and it is still possible for this error to occur.
ClassEscapeInvalidAn invalid escape sequence was found in a character class set.
ClassRangeInvalidAn invalid character class range was found. An invalid range is any range where the start is greater than the end.
ClassRangeLiteralAn invalid range boundary was found in a character class. Range boundaries must be a single literal codepoint, but this error indicates that something else was found, such as a nested class.
ClassUnclosedAn opening [ was found with no corresponding closing ].
DecimalEmptyAn empty decimal number was given where one was expected.
DecimalInvalidAn invalid decimal number was given where one was expected.
EscapeHexEmptyA bracketed hex literal was empty.
EscapeHexInvalidA bracketed hex literal did not correspond to a Unicode scalar value.
EscapeHexInvalidDigitAn invalid hexadecimal digit was found.
EscapeUnexpectedEofEOF was found before an escape sequence was completed.
EscapeUnrecognizedAn unrecognized escape sequence.
FlagDanglingNegationA dangling negation was used when setting flags, e.g., i-.
FlagDuplicateA flag was used twice, e.g., i-i.
Fields of FlagDuplicate
                           original: Span | The position of the original flag. The error position points to the duplicate flag.  | 
FlagRepeatedNegationThe negation operator was used twice, e.g., -i-s.
Fields of FlagRepeatedNegation
                           original: Span | The position of the original negation operator. The error position points to the duplicate negation operator.  | 
FlagUnexpectedEofExpected a flag but got EOF, e.g., (?.
FlagUnrecognizedUnrecognized flag, e.g., a.
GroupNameDuplicateA duplicate capture name was found.
Fields of GroupNameDuplicate
                           original: Span | The position of the initial occurrence of the capture name. The error position itself points to the duplicate occurrence.  | 
GroupNameEmptyA capture group name is empty, e.g., (?P<>abc).
GroupNameInvalidAn invalid character was seen for a capture group name. This includes errors where the first character is a digit (even though subsequent characters are allowed to be digits).
GroupNameUnexpectedEofA closing > could not be found for a capture group name.
GroupUnclosedAn unclosed group, e.g., (ab.
The span of this error corresponds to the unclosed parenthesis.
GroupUnopenedAn unopened group, e.g., ab).
NestLimitExceeded(u32)The nest limit was exceeded. The limit stored here is the limit configured in the parser.
RepetitionCountInvalidThe range provided in a counted repetition operator is invalid. The range is invalid if the start is greater than the end.
RepetitionCountUnclosedAn opening { was found with no corresponding closing }.
RepetitionMissingA repetition operator was applied to a missing sub-expression. This
occurs, for example, in the regex consisting of just a * or even
(?i)*. It is, however, possible to create a repetition operating on
an empty sub-expression. For example, ()* is still considered valid.
UnsupportedBackreferenceWhen octal support is disabled, this error is produced when an octal escape is used. The octal escape is assumed to be an invocation of a backreference, which is the common case.
UnsupportedLookAroundWhen syntax similar to PCRE's look-around is used, this error is
returned. Some example syntaxes that are rejected include, but are
not necessarily limited to, (?=re), (?!re), (?<=re) and
(?<!re). Note that all of these syntaxes are otherwise invalid; this
error is used to improve the user experience.
Trait Implementations
impl Clone for ErrorKind[src] 
impl Clone for ErrorKindfn clone(&self) -> ErrorKind[src] 
fn clone(&self) -> ErrorKindReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src] 
fn clone_from(&mut self, source: &Self)Performs copy-assignment from source. Read more
impl Debug for ErrorKind[src] 
impl Debug for ErrorKindfn fmt(&self, f: &mut Formatter) -> Result[src] 
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl Eq for ErrorKind[src] 
impl Eq for ErrorKindimpl PartialEq for ErrorKind[src] 
impl PartialEq for ErrorKindfn eq(&self, other: &ErrorKind) -> bool[src] 
fn eq(&self, other: &ErrorKind) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &ErrorKind) -> bool[src] 
fn ne(&self, other: &ErrorKind) -> boolThis method tests for !=.
impl Display for ErrorKind[src] 
impl Display for ErrorKindAuto Trait Implementations
Blanket Implementations
impl<T> ToOwned for T where
    T: Clone, [src] 
impl<T> ToOwned for T where
    T: Clone, type Owned = T
fn to_owned(&self) -> T[src] 
fn to_owned(&self) -> TCreates owned data from borrowed data, usually by cloning. Read more
fn clone_into(&self, target: &mut T)[src] 
fn clone_into(&self, target: &mut T)🔬 This is a nightly-only experimental API.  (toowned_clone_into)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<T> From for T[src] 
impl<T> From for Timpl<T> ToString for T where
    T: Display + ?Sized, [src] 
impl<T> ToString for T where
    T: Display + ?Sized, impl<T, U> Into for T where
    U: From<T>, [src] 
impl<T, U> Into for T where
    U: From<T>, impl<T, U> TryFrom for T where
    T: From<U>, [src] 
impl<T, U> TryFrom for T where
    T: From<U>, type Error = !
try_from)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src] 
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>try_from)Performs the conversion.
impl<T> Borrow for T where
    T: ?Sized, [src] 
impl<T> Borrow for T where
    T: ?Sized, ⓘImportant traits for &'a mut Rfn borrow(&self) -> &T[src] 
fn borrow(&self) -> &TImmutably borrows from an owned value. Read more
impl<T, U> TryInto for T where
    U: TryFrom<T>, [src] 
impl<T, U> TryInto for T where
    U: TryFrom<T>, type Error = <U as TryFrom<T>>::Error
try_from)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src] 
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>try_from)Performs the conversion.
impl<T> BorrowMut for T where
    T: ?Sized, [src] 
impl<T> BorrowMut for T where
    T: ?Sized, ⓘImportant traits for &'a mut Rfn borrow_mut(&mut self) -> &mut T[src] 
fn borrow_mut(&mut self) -> &mut TMutably borrows from an owned value. Read more
impl<T> Any for T where
    T: 'static + ?Sized, [src] 
impl<T> Any for T where
    T: 'static + ?Sized, fn get_type_id(&self) -> TypeId[src] 
fn get_type_id(&self) -> TypeId🔬 This is a nightly-only experimental API.  (get_type_id)
this method will likely be replaced by an associated static
Gets the TypeId of self. Read more