#[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.
Trait Implementations§
impl Eq for ErrorKind
impl StructuralPartialEq for ErrorKind
Auto Trait Implementations§
impl Freeze for ErrorKind
impl RefUnwindSafe for ErrorKind
impl Send for ErrorKind
impl Sync for ErrorKind
impl Unpin for ErrorKind
impl UnwindSafe for ErrorKind
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 1 byte
Size for each variant:
UnicodeNotAllowed
: 0 bytesInvalidUtf8
: 0 bytesInvalidLineTerminator
: 0 bytesUnicodePropertyNotFound
: 0 bytesUnicodePropertyValueNotFound
: 0 bytesUnicodePerlClassNotFound
: 0 bytesUnicodeCaseUnavailable
: 0 bytes