pub struct SlotCache { /* private fields */ }Expand description
A fixed-capacity LRU set of resident groups over cap_slots byte slots.
Implementations§
Source§impl SlotCache
impl SlotCache
pub fn new(cap_slots: u32) -> Self
pub fn capacity(&self) -> u32
Sourcepub fn plan_write(&mut self, key: GroupKey) -> WritePlan
pub fn plan_write(&mut self, key: GroupKey) -> WritePlan
Plan a write of key. Overwrite-in-place if resident (no victim); else a
free slot; else evict the LRU slot and report its group to flush down.
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