Enum regex_automata::meta::error::RetryError
source · pub(crate) enum RetryError {
Quadratic(RetryQuadraticError),
Fail(RetryFailError),
}
Expand description
An error that occurs when a search should be retried.
This retry error distinguishes between two different failure modes.
The first is one where potential quadratic behavior has been detected. In this case, whatever optimization that led to this behavior should be stopped, and the next best strategy should be used.
The second indicates that the underlying regex engine has failed for some reason. This usually occurs because either a lazy DFA’s cache has become ineffective or because a non-ASCII byte has been seen and a Unicode word boundary was used in one of the patterns. In this failure case, a different regex engine that won’t fail in these ways (PikeVM, backtracker or the one-pass DFA) should be used.
This is an internal error only and should never bleed into the public API.