Struct CacheError
struct CacheError(_)
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.
Implementations
impl Clone for CacheError
fn clone(self: &Self) -> CacheError
impl Debug for CacheError
fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result
impl Display for CacheError
fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result
impl Error for CacheError
impl Freeze for CacheError
impl RefUnwindSafe for CacheError
impl Send for CacheError
impl Sync for CacheError
impl Unpin for CacheError
impl UnsafeUnpin for CacheError
impl UnwindSafe for CacheError
impl<T> Any for CacheError
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for CacheError
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for CacheError
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> CloneToUninit for CacheError
unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)
impl<T> From for CacheError
fn from(t: T) -> TReturns the argument unchanged.
impl<T> ToOwned for CacheError
fn to_owned(self: &Self) -> Tfn clone_into(self: &Self, target: &mut T)
impl<T> ToString for CacheError
fn to_string(self: &Self) -> String
impl<T, U> Into for CacheError
fn into(self: Self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom for CacheError
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for CacheError
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>