pub struct SimplificationCache { /* private fields */ }Expand description
Thread-safe cache for expression simplification results.
Caches the result of expensive simplification operations to avoid re-running e-graph saturation for the same expressions.
Implementations§
Source§impl SimplificationCache
impl SimplificationCache
Sourcepub fn with_capacity(max_size: usize) -> Self
pub fn with_capacity(max_size: usize) -> Self
Create a new simplification cache with specified maximum size
Sourcepub fn get_or_simplify<F>(&self, expr: &Expression, simplify: F) -> Expressionwhere
F: FnOnce() -> Expression,
pub fn get_or_simplify<F>(&self, expr: &Expression, simplify: F) -> Expressionwhere
F: FnOnce() -> Expression,
Get or compute a simplified expression
Sourcepub fn stats(&self) -> CacheStats
pub fn stats(&self) -> CacheStats
Get cache statistics
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for SimplificationCache
impl !RefUnwindSafe for SimplificationCache
impl Send for SimplificationCache
impl Sync for SimplificationCache
impl Unpin for SimplificationCache
impl UnwindSafe for SimplificationCache
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> 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