Enum kaspa_database::prelude::CachePolicy
source · pub enum CachePolicy {
Empty,
Count(usize),
Tracked {
max_size: usize,
min_items: usize,
mem_mode: MemMode,
},
}Variants§
Empty
An empty cache (avoids acquiring locks etc so considered perf-free)
Count(usize)
The cache bounds the number of items it holds w/o tracking their inner size
Tracked
Items are tracked by size with a max_size limit overall. The cache will pass this limit
if there are no more than min_items items in the cache. mem_mode determines whether
items are tracked by bytes or by units
Trait Implementations§
source§impl Clone for CachePolicy
impl Clone for CachePolicy
source§fn clone(&self) -> CachePolicy
fn clone(&self) -> CachePolicy
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for CachePolicy
impl Debug for CachePolicy
impl Copy for CachePolicy
Auto Trait Implementations§
impl RefUnwindSafe for CachePolicy
impl Send for CachePolicy
impl Sync for CachePolicy
impl Unpin for CachePolicy
impl UnwindSafe for CachePolicy
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
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