Enum regex_syntax::hir::ErrorKind
source · #[non_exhaustive]pub enum ErrorKind {
UnicodeNotAllowed,
InvalidUtf8,
InvalidLineTerminator,
UnicodePropertyNotFound,
UnicodePropertyValueNotFound,
UnicodePerlClassNotFound,
UnicodeCaseUnavailable,
}
Expand description
The type of an error that occurred while building an Hir
.
This error type is marked as non_exhaustive
. This means that adding a
new variant is not considered a breaking change.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
UnicodeNotAllowed
This error occurs when a Unicode feature is used when Unicode
support is disabled. For example (?-u:\pL)
would trigger this error.
InvalidUtf8
This error occurs when translating a pattern that could match a byte
sequence that isn’t UTF-8 and utf8
was enabled.
InvalidLineTerminator
This error occurs when one uses a non-ASCII byte for a line terminator, but where Unicode mode is enabled and UTF-8 mode is disabled.
UnicodePropertyNotFound
This occurs when an unrecognized Unicode property name could not be found.
UnicodePropertyValueNotFound
This occurs when an unrecognized Unicode property value could not be found.
UnicodePerlClassNotFound
This occurs when a Unicode-aware Perl character class (\w
, \s
or
\d
) could not be found. This can occur when the unicode-perl
crate feature is not enabled.
This occurs when the Unicode simple case mapping tables are not available, and the regular expression required Unicode aware case insensitivity.