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 like
dfa::Config::minimum_cache_clear_count
and
dfa::Config::minimum_bytes_per_state.
When the std feature is enabled, this implements the std::error::Error
trait.
Trait Implementations§
Source§impl Clone for CacheError
impl Clone for CacheError
Source§fn clone(&self) -> CacheError
fn clone(&self) -> CacheError
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CacheError
impl Debug for CacheError
Source§impl Display for CacheError
impl Display for CacheError
Source§impl Error for CacheError
Available on crate feature std only.
impl Error for CacheError
std only.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()