pub enum PatternError<'a> {
StringEscape(usize, &'a str),
StringEnd(usize, &'a str),
RegexEscape(usize, &'a str),
RegexEnd(usize, &'a str),
Token(usize, &'a str),
UnknownParameter(usize, &'a str),
UnknownPredicate(usize, &'a str),
Regex(usize, &'a str, Error),
}Expand description
These are errors that may be returned by the pattern compiler when compiling a pattern.
“String” here refers to a string literal in the pattern, not the input string. The input string is referred to as “the pattern”.
Variants§
StringEscape(usize, &'a str)
The pattern contains an invalid string escape.
StringEnd(usize, &'a str)
The pattern ends in the middle of a string literal.
RegexEscape(usize, &'a str)
The pattern contains an invalid regex escape.
RegexEnd(usize, &'a str)
The pattern ends in the middle of a regex literal.
Token(usize, &'a str)
The pattern contains characters that don’t make up a token.
UnknownParameter(usize, &'a str)
The pattern requests a parameter that wasn’t provided.
UnknownPredicate(usize, &'a str)
The pattern requests a predicate that wasn’t provided.
Regex(usize, &'a str, Error)
The pattern contains an invalid regex.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for PatternError<'a>
impl<'a> RefUnwindSafe for PatternError<'a>
impl<'a> Send for PatternError<'a>
impl<'a> Sync for PatternError<'a>
impl<'a> Unpin for PatternError<'a>
impl<'a> UnwindSafe for PatternError<'a>
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
Mutably borrows from an owned value. Read more