pub struct WasmBuildCachePrunePolicy { /* private fields */ }Expand description
Caller-selected retention limits for content-addressed Cargo target directories.
Age pruning runs before size pruning. A policy without either limit scans the cache and writes its cache-directory tag without removing entries.
Implementations§
Source§impl WasmBuildCachePrunePolicy
impl WasmBuildCachePrunePolicy
Sourcepub const fn new() -> Self
pub const fn new() -> Self
Create a policy that records cache metadata without removing entries.
Sourcepub const fn with_max_age(self, max_age: Duration) -> Self
pub const fn with_max_age(self, max_age: Duration) -> Self
Remove entries older than max_age before applying the size limit.
Sourcepub const fn with_max_size_bytes(self, bytes: u64) -> Self
pub const fn with_max_size_bytes(self, bytes: u64) -> Self
Remove least-recently-used entries until retained logical size is at most bytes.
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 WasmBuildCachePrunePolicy
impl Clone for WasmBuildCachePrunePolicy
Source§fn clone(&self) -> WasmBuildCachePrunePolicy
fn clone(&self) -> WasmBuildCachePrunePolicy
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for WasmBuildCachePrunePolicy
Source§impl Debug for WasmBuildCachePrunePolicy
impl Debug for WasmBuildCachePrunePolicy
Source§impl Default for WasmBuildCachePrunePolicy
impl Default for WasmBuildCachePrunePolicy
Source§fn default() -> WasmBuildCachePrunePolicy
fn default() -> WasmBuildCachePrunePolicy
Returns the “default value” for a type. Read more
impl Eq for WasmBuildCachePrunePolicy
impl StructuralPartialEq for WasmBuildCachePrunePolicy
Auto Trait Implementations§
impl Freeze for WasmBuildCachePrunePolicy
impl RefUnwindSafe for WasmBuildCachePrunePolicy
impl Send for WasmBuildCachePrunePolicy
impl Sync for WasmBuildCachePrunePolicy
impl Unpin for WasmBuildCachePrunePolicy
impl UnsafeUnpin for WasmBuildCachePrunePolicy
impl UnwindSafe for WasmBuildCachePrunePolicy
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.