Struct regex_automata::hybrid::CacheError
source · [−]pub struct CacheError(_);
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
.
When the std
feature is enabled, this implements the std::error::Error
trait.
Trait Implementations
sourceimpl Clone for CacheError
impl Clone for CacheError
sourcefn clone(&self) -> CacheError
fn clone(&self) -> CacheError
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for CacheError
impl Debug for CacheError
sourceimpl Display for CacheError
impl Display for CacheError
sourceimpl Error for CacheError
impl Error for CacheError
sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
sourcefn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
backtrace
)Returns a stack backtrace, if available, of where this error occurred. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Auto Trait Implementations
impl RefUnwindSafe for CacheError
impl Send for CacheError
impl Sync for CacheError
impl Unpin for CacheError
impl UnwindSafe for CacheError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more