pub struct WhnfCache { /* private fields */ }Expand description
Cache for weak head normal form (WHNF) reduction results
Implementations§
Source§impl WhnfCache
impl WhnfCache
Sourcepub fn lookup(&mut self, expr: &SimplifiedExpr) -> Option<SimplifiedExpr>
pub fn lookup(&mut self, expr: &SimplifiedExpr) -> Option<SimplifiedExpr>
Look up an expression’s WHNF in the cache
Sourcepub fn store(&mut self, expr: &SimplifiedExpr, whnf: SimplifiedExpr)
pub fn store(&mut self, expr: &SimplifiedExpr, whnf: SimplifiedExpr)
Store an expression and its WHNF in the cache
Sourcepub fn set_transparency(&mut self, mode: bool)
pub fn set_transparency(&mut self, mode: bool)
Set transparency mode
Sourcepub fn is_transparent(&self) -> bool
pub fn is_transparent(&self) -> bool
Get current transparency mode
Auto Trait Implementations§
impl Freeze for WhnfCache
impl RefUnwindSafe for WhnfCache
impl Send for WhnfCache
impl Sync for WhnfCache
impl Unpin for WhnfCache
impl UnsafeUnpin for WhnfCache
impl UnwindSafe for WhnfCache
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