Trait for caches that can be managed by the memory-aware manager
| 104 | |
| 105 | /// Trait for caches that can be managed by the memory-aware manager |
| 106 | pub trait ManagedCache { |
| 107 | fn evict_percentage(&self, percentage: f32) -> usize; |
| 108 | fn clear(&self); |
| 109 | fn len(&self) -> usize; |
| 110 | fn memory_usage_bytes(&self) -> usize; |
| 111 | fn stats_summary(&self) -> String; |
| 112 | } |
| 113 | |
| 114 | /// Implementation of ManagedCache for TtlCache |
| 115 | impl<K, V> ManagedCache for TtlCache<K, V> |
nothing calls this directly
no outgoing calls
no test coverage detected