ErrorKind in regex_syntax::hir - Rust (original) (raw)


#[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.

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.

§

This error occurs when a Unicode feature is used when Unicode support is disabled. For example (?-u:\pL) would trigger this error.

§

This error occurs when translating a pattern that could match a byte sequence that isn’t UTF-8 and utf8 was enabled.

§

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.

§

This occurs when an unrecognized Unicode property name could not be found.

§

This occurs when an unrecognized Unicode property value could not be found.

§

This occurs when a Unicode-aware Perl character class (\w, \s or\d) could not be found. This can occur when the unicode-perlcrate 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.

§

§

§

§

§

§