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§
Sourcefn get(&self, key: &KernelCacheKey) -> Option<Float>
fn get(&self, key: &KernelCacheKey) -> Option<Float>
Get cached kernel value
Sourcefn insert(&self, key: KernelCacheKey, value: Float)
fn insert(&self, key: KernelCacheKey, value: Float)
Insert kernel value into cache
Sourcefn stats(&self) -> CacheStatistics
fn stats(&self) -> CacheStatistics
Get cache statistics
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".