CacheError in regex_automata::hybrid - Rust (original) (raw)
pub struct CacheError(/* private fields */);
Expand description
An error that occurs when cache usage has become inefficient.
One of the weaknesses of a lazy DFA is that it may need to clear its cache repeatedly if it’s not big enough. If this happens too much, then it can slow searching down significantly. A mitigation to this is to use heuristics to detect whether the cache is being used efficiently or not. If not, then a lazy DFA can return a CacheError
.
The default configuration of a lazy DFA in this crate is set such that a CacheError
will never occur. Instead, callers must opt into this behavior with settings likedfa::Config::minimum_cache_clear_countanddfa::Config::minimum_bytes_per_state.
When the std
feature is enabled, this implements the std::error::Error
trait.
The lower-level source of this error, if any. Read more
👎Deprecated since 1.42.0: use the Display impl or to_string()
👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
🔬This is a nightly-only experimental API. (error_generic_member_access
)
Provides type based access to context intended for error reports. Read more