pub struct ExplanationCache { /* private fields */ }Expand description
Explanation cache with LRU eviction.
Implementations§
Source§impl ExplanationCache
impl ExplanationCache
Sourcepub fn new(config: CacheConfig) -> Self
pub fn new(config: CacheConfig) -> Self
Create a new explanation cache.
Sourcepub fn default_config() -> Self
pub fn default_config() -> Self
Create with default configuration.
Sourcepub fn insert(
&mut self,
key: CacheKey,
literals: Vec<Lit>,
proof: Option<String>,
)
pub fn insert( &mut self, key: CacheKey, literals: Vec<Lit>, proof: Option<String>, )
Insert an explanation into the cache.
Sourcepub fn get(&mut self, key: CacheKey) -> Option<&Explanation>
pub fn get(&mut self, key: CacheKey) -> Option<&Explanation>
Get an explanation from the cache.
Sourcepub fn stats(&self) -> &CacheStats
pub fn stats(&self) -> &CacheStats
Get statistics.
Sourcepub fn reset_stats(&mut self)
pub fn reset_stats(&mut self)
Reset statistics.
Trait Implementations§
Source§impl Debug for ExplanationCache
impl Debug for ExplanationCache
Auto Trait Implementations§
impl Freeze for ExplanationCache
impl RefUnwindSafe for ExplanationCache
impl Send for ExplanationCache
impl Sync for ExplanationCache
impl Unpin for ExplanationCache
impl UnwindSafe for ExplanationCache
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more