pub struct SlotCache { /* private fields */ }Expand description
2026-09-25: A fixed-capacity LRU set of resident groups over cap_slots
slots.
Implementations§
Source§impl SlotCache
impl SlotCache
pub fn new(cap_slots: u32) -> Self
pub fn capacity(&self) -> u32
Sourcepub fn touch(&mut self, slot: u32)
pub fn touch(&mut self, slot: u32)
2026-09-25: Make slot the most recently used. Callers pass occupied
slots, from plan_read hits.
Sourcepub fn plan_write(&mut self, key: GroupKey) -> WritePlan
pub fn plan_write(&mut self, key: GroupKey) -> WritePlan
2026-09-25: Plan a write of key: its own slot if resident, else a free
slot, else the least recently used slot, whose group is returned as the
victim.
Auto Trait Implementations§
impl Freeze for SlotCache
impl RefUnwindSafe for SlotCache
impl Send for SlotCache
impl Sync for SlotCache
impl Unpin for SlotCache
impl UnwindSafe for SlotCache
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