pub enum CacheSource {
Explicit,
EnvVar,
ProjectDiscovery,
OsCacheDir,
CwdFallback,
}Expand description
Where a CacheResolver-resolved cache root came from. Returned alongside
the root so binaries can announce it (e.g.
cache: ~/Library/Caches/com.acme.tool (os-cache-dir)) — cache placement
must never be silent.
Variants§
Explicit
Explicit --dir-style path; wins over everything.
EnvVar
Environment variable (see CacheResolver::env_var).
ProjectDiscovery
Cargo workspace/crate discovery (<workspace>/.cache).
OsCacheDir
OS-native per-user cache dir (os-cache-dir feature).
CwdFallback
Last-resort <cwd>/.cache; only reachable when the caller explicitly
sets CacheResolver::allow_cwd_fallback.
Trait Implementations§
Source§impl Clone for CacheSource
impl Clone for CacheSource
impl Copy for CacheSource
Source§impl Debug for CacheSource
impl Debug for CacheSource
impl Eq for CacheSource
Source§impl PartialEq for CacheSource
impl PartialEq for CacheSource
impl StructuralPartialEq for CacheSource
Auto Trait Implementations§
impl Forget for CacheSource
impl Freeze for CacheSource
impl Move for CacheSource
impl RefUnwindSafe for CacheSource
impl Send for CacheSource
impl Sync for CacheSource
impl Unpin for CacheSource
impl UnsafeUnpin for CacheSource
impl UnwindSafe for CacheSource
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