Skip to main content

CachePolicy

Trait CachePolicy 

Source
pub trait CachePolicy {
    type Evict: EvictionPolicy + Default;

    const T2_THRESHOLD: u16;
    const T1_THRESHOLD: u16;
    const T0_THRESHOLD: u16;
    const _ASSERT_POWER_OF_TWO: () = _;
}

Required Associated Constants§

Source

const T2_THRESHOLD: u16

Hit count threshold to promote from Local TLS Cache to T2 Core Cache.

Source

const T1_THRESHOLD: u16

Hit count threshold to promote from T2 to T1.

Source

const T0_THRESHOLD: u16

Hit count threshold to promote from T1 to T0.

Provided Associated Constants§

Source

const _ASSERT_POWER_OF_TWO: () = _

Compile-Time Assertions Forces the user-defined thresholds to be powers of two.

Required Associated Types§

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§