pub struct FixedCache<'a> { /* private fields */ }Expand description
One immutable pack in caller-owned storage. Capacity failures preserve the previous entry. Disabling bypasses reads and insertions, retaining the entry until explicit eviction or replacement. Counters saturate at u64::MAX.
Implementations§
Source§impl<'a> FixedCache<'a>
impl<'a> FixedCache<'a>
pub fn new(storage: &'a mut [u8]) -> Self
pub fn set_enabled(&mut self, enabled: bool)
pub fn statistics(&self) -> Statistics
pub fn evict(&mut self)
Trait Implementations§
Auto Trait Implementations§
impl<'a> !UnwindSafe for FixedCache<'a>
impl<'a> Freeze for FixedCache<'a>
impl<'a> RefUnwindSafe for FixedCache<'a>
impl<'a> Send for FixedCache<'a>
impl<'a> Sync for FixedCache<'a>
impl<'a> Unpin for FixedCache<'a>
impl<'a> UnsafeUnpin for FixedCache<'a>
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