pub struct EvictionConfig {
pub budget_bytes: usize,
pub half_life_commits: f64,
}Expand description
When to evict, and what to keep.
Fields§
§budget_bytes: usizeApproximate ceiling on a branch’s entries, in bytes. Accounting is an estimate: it counts the data, not the allocator’s overhead.
half_life_commits: f64How many commits it takes for an unread entry’s score to halve.
Small values forget quickly; large values keep things around on the strength of one early read. Measured in commits rather than seconds, so a database that sits idle forgets nothing.
Implementations§
Trait Implementations§
Source§impl Clone for EvictionConfig
impl Clone for EvictionConfig
impl Copy for EvictionConfig
Source§impl Debug for EvictionConfig
impl Debug for EvictionConfig
Source§impl Default for EvictionConfig
impl Default for EvictionConfig
Source§impl PartialEq for EvictionConfig
impl PartialEq for EvictionConfig
impl StructuralPartialEq for EvictionConfig
Auto Trait Implementations§
impl Freeze for EvictionConfig
impl RefUnwindSafe for EvictionConfig
impl Send for EvictionConfig
impl Sync for EvictionConfig
impl Unpin for EvictionConfig
impl UnsafeUnpin for EvictionConfig
impl UnwindSafe for EvictionConfig
Blanket Implementations§
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