#[non_exhaustive]pub struct CacheConfig {
pub enabled: bool,
pub clear: bool,
pub dir: Option<PathBuf>,
}Available on crate feature
vcs-git only.Expand description
Front-end control over the persistent cache for one build.
The default both enables caching and uses the platform default
directory, so a front end opts out (rather than in) — matching the
issue’s --no-cache / --clear-cache flags.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.enabled: boolRead from and write to the cache. false forces a fresh walk and
skips persistence (--no-cache).
clear: boolRemove this repository’s cache directory before building
(--clear-cache). Honoured even when enabled is false.
dir: Option<PathBuf>Cache root directory. None selects the platform default (default_cache_dir)
(--cache-dir overrides it).
Trait Implementations§
Source§impl Clone for CacheConfig
impl Clone for CacheConfig
Source§fn clone(&self) -> CacheConfig
fn clone(&self) -> CacheConfig
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 moreSource§impl Debug for CacheConfig
impl Debug for CacheConfig
Auto Trait Implementations§
impl Freeze for CacheConfig
impl RefUnwindSafe for CacheConfig
impl Send for CacheConfig
impl Sync for CacheConfig
impl Unpin for CacheConfig
impl UnsafeUnpin for CacheConfig
impl UnwindSafe for CacheConfig
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