#[non_exhaustive]pub enum ErrorKind {
Show 16 variants
Escape,
EscapeUnfinished,
UnicodeEscape,
UnicodeRange,
GroupUnopened,
GroupUnclosed,
GroupNothing,
SetUnclosed,
SetEmpty,
SetRange,
Repeat,
Optional,
Special,
SpecialParameter,
MarkovLength,
DepthLimit,
}Expand description
What is wrong with a pattern.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Escape
A backslash before a character that it has no meaning with, as in \q.
EscapeUnfinished
A backslash at the end of the pattern.
UnicodeEscape
A unicode escape that is not \u{…} with one to six hex digits.
UnicodeRange
A unicode escape with a number that is not a character.
GroupUnopened
A ) that does not close a group.
GroupUnclosed
A ( without a ) for it.
GroupNothing
All segments of a group have a weight of zero.
SetUnclosed
A [ without a ] for it.
SetEmpty
A set without characters, as in [].
SetRange
A range in a set that is not from a character to one that is not before it.
Repeat
Braces that are not a number or a range of numbers, a range that is the wrong way around, or weights of segments that are too large.
Optional
A ? without something before it.
Special
No name in braces after \w, \m or \p.
SpecialParameter
Something after a colon in the braces, for something that does not take it.
MarkovLength
The length in \m{name:length} is not a number that is allowed.
DepthLimit
Groups are nested more deeply than DEPTH_LIMIT.
Trait Implementations§
impl Copy for ErrorKind
impl Eq for ErrorKind
Source§impl Error for ErrorKind
impl Error for ErrorKind
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
impl StructuralPartialEq for ErrorKind
Auto Trait Implementations§
impl Forget for ErrorKind
impl Freeze for ErrorKind
impl Move for ErrorKind
impl RefUnwindSafe for ErrorKind
impl Send for ErrorKind
impl Sync for ErrorKind
impl Unpin for ErrorKind
impl UnsafeUnpin 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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.