pub struct CacheRetentionLimits { /* private fields */ }Expand description
Caller-selected age and logical-size thresholds for cache maintenance.
Thresholds do not select a cleanup algorithm or schedule maintenance. Exact-entry pruning removes expired and then least-recently-used entries, skipping live retained records. Shared-target maintenance clears the entire mutable Cargo state when either threshold is exceeded. It preserves only the target root and IC Build’s coordination metadata; do not colocate unrelated data there. Without thresholds, no committed entry or shared compiler state is removed. Explicit transaction maintenance may still clear abandoned staging.
Implementations§
Source§impl CacheRetentionLimits
impl CacheRetentionLimits
Sourcepub const fn with_max_age(self, max_age: Duration) -> Self
pub const fn with_max_age(self, max_age: Duration) -> Self
Set the maximum time since recorded cache use.
Sourcepub const fn with_max_size_bytes(self, bytes: u64) -> Self
pub const fn with_max_size_bytes(self, bytes: u64) -> Self
Set the maximum logical cache size.
Sourcepub const fn max_size_bytes(self) -> Option<u64>
pub const fn max_size_bytes(self) -> Option<u64>
Configured maximum logical cache size in bytes, if any.
Trait Implementations§
Source§impl Clone for CacheRetentionLimits
impl Clone for CacheRetentionLimits
impl Copy for CacheRetentionLimits
Source§impl Debug for CacheRetentionLimits
impl Debug for CacheRetentionLimits
Source§impl Default for CacheRetentionLimits
impl Default for CacheRetentionLimits
impl Eq for CacheRetentionLimits
Source§impl PartialEq for CacheRetentionLimits
impl PartialEq for CacheRetentionLimits
impl StructuralPartialEq for CacheRetentionLimits
Auto Trait Implementations§
impl Freeze for CacheRetentionLimits
impl RefUnwindSafe for CacheRetentionLimits
impl Send for CacheRetentionLimits
impl Sync for CacheRetentionLimits
impl Unpin for CacheRetentionLimits
impl UnsafeUnpin for CacheRetentionLimits
impl UnwindSafe for CacheRetentionLimits
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