Skip to main content

CacheManager

Struct CacheManager 

Source
pub struct CacheManager { /* private fields */ }
Expand description

Global cache manager for all kernel caches

Implementations§

Source§

impl CacheManager

Source

pub fn new() -> Self

Create a new cache manager with default capacities

Source

pub fn with_capacities( whnf_cap: usize, defeq_cap: usize, infer_cap: usize, ) -> Self

Create a cache manager with custom capacities

Source

pub fn whnf_mut(&mut self) -> &mut WhnfCache

Get mutable reference to WHNF cache

Source

pub fn defeq_mut(&mut self) -> &mut DefEqCache

Get mutable reference to DefEq cache

Source

pub fn infer_mut(&mut self) -> &mut InferCache

Get mutable reference to Infer cache

Source

pub fn clear_all(&mut self)

Clear all caches

Source

pub fn resize_all( &mut self, whnf_cap: usize, defeq_cap: usize, infer_cap: usize, )

Resize all caches to new capacities

Source

pub fn statistics(&self) -> CacheStatistics

Get comprehensive statistics for all caches

Trait Implementations§

Source§

impl Default for CacheManager

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.