Skip to main content

ThreadSafeKernelCache

Trait ThreadSafeKernelCache 

Source
pub trait ThreadSafeKernelCache: Send + Sync {
    // Required methods
    fn get(&self, key: &KernelCacheKey) -> Option<Float>;
    fn insert(&self, key: KernelCacheKey, value: Float);
    fn clear(&self);
    fn stats(&self) -> CacheStatistics;
    fn size(&self) -> usize;
}
Expand description

Thread-safe kernel cache using multiple strategies

Required Methods§

Source

fn get(&self, key: &KernelCacheKey) -> Option<Float>

Get cached kernel value

Source

fn insert(&self, key: KernelCacheKey, value: Float)

Insert kernel value into cache

Source

fn clear(&self)

Clear the cache

Source

fn stats(&self) -> CacheStatistics

Get cache statistics

Source

fn size(&self) -> usize

Get current cache size

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§