pub struct CacheView {
pub name: String,
pub max_bytes: u64,
pub preferred_max_bytes: u64,
pub current_bytes: u64,
pub stats: ResizableStats,
}Expand description
A single cache’s view passed to the policy.
Fields§
§name: StringHuman-readable name (forwarded from
Resizable::name).
max_bytes: u64Current soft cap, in bytes.
preferred_max_bytes: u64Cache’s preferred ceiling — typically its construction-time value. The policy refuses to grow caps above this.
current_bytes: u64Currently held bytes.
stats: ResizableStatsStats snapshot.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CacheView
impl RefUnwindSafe for CacheView
impl Send for CacheView
impl Sync for CacheView
impl Unpin for CacheView
impl UnsafeUnpin for CacheView
impl UnwindSafe for CacheView
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