pub enum QueryError {
Unsupported {
construct: &'static str,
at: usize,
},
UnbalancedGroup {
at: usize,
},
UnclosedClass {
at: usize,
},
UnclosedOptional {
at: usize,
},
BadRepeat {
at: usize,
},
BadClass {
at: usize,
},
BadCharCode {
at: usize,
},
TrailingBackslash {
at: usize,
},
TooComplex,
Cancelled,
}Expand description
Why a query cannot compile or run. Typed end to end — the walker
Variants§
Unsupported
A construct outside the supported dialect (lookaround, \%V,
\%#, \%23l-style positions, ~, the \M/\V magic
levels, the \%= engine selector). at is the byte offset in
the pattern where the construct starts.
UnbalancedGroup
\( never closed, or a stray \).
UnclosedClass
[ never closed.
UnclosedOptional
\%[ never closed.
BadRepeat
Malformed \{...} (bad numbers, missing \}), a quantifier
with nothing to repeat, or a quantifier after a quantifier.
BadClass
Bad collection contents: reverse range, unknown POSIX class,
or && intersection.
BadCharCode
Malformed \%d/\%x/\%u/\%U char code.
TrailingBackslash
The pattern ends in a lone backslash.
TooComplex
The bounded engine’s step budget ran out (vim’s E363 family) — the pattern is too expensive to run, not wrong.
Cancelled
Superseded background work stops without publishing a partial answer.
Trait Implementations§
Source§impl Clone for QueryError
impl Clone for QueryError
Source§fn clone(&self) -> QueryError
fn clone(&self) -> QueryError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for QueryError
impl Debug for QueryError
Source§impl Display for QueryError
impl Display for QueryError
impl Eq for QueryError
Source§impl Error for QueryError
impl Error for QueryError
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()