pub struct CacheBudget {
pub max_entries: usize,
pub max_bytes: u64,
}Expand description
Per-namespace eviction budget. cache_put enforces both caps: on
insert, the LRU is evicted until both live-entry count and live
byte total fit under the caps.
Fields§
§max_entries: usizeHard cap on live directory entries for this namespace.
max_bytes: u64Hard cap on live payload bytes for this namespace.
Trait Implementations§
Auto Trait Implementations§
impl Forget for CacheBudget
impl Freeze for CacheBudget
impl RefUnwindSafe for CacheBudget
impl Send for CacheBudget
impl Sync for CacheBudget
impl Unpin for CacheBudget
impl UnsafeUnpin for CacheBudget
impl UnwindSafe for CacheBudget
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