pub struct CacheError(/* private fields */);
Available on crate feature
hybrid
only.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
Returns a copy of the value. Read more
1.6.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
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
Available on crate feature
std
only.1.81.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.81.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for CacheError
impl RefUnwindSafe for CacheError
impl Send for CacheError
impl Sync for CacheError
impl Unpin for CacheError
impl UnwindSafe for CacheError
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)