pub struct CacheLayout { /* private fields */ }Expand description
On-disk layout for bv’s local cache.
Implementations§
Source§impl CacheLayout
impl CacheLayout
Sourcepub fn new() -> Self
pub fn new() -> Self
Resolve the cache root.
Priority:
BV_CACHE_DIRenv var (used by tests and CI for isolation)$XDG_CACHE_HOME/bvifXDG_CACHE_HOMEis set~/.cache/bv(consistent across Linux and macOS)
pub fn with_root(root: PathBuf) -> Self
pub fn root(&self) -> &PathBuf
Sourcepub fn image_dir(&self, digest: &str) -> PathBuf
pub fn image_dir(&self, digest: &str) -> PathBuf
<root>/images/<digest>/ - metadata we track alongside runtime storage.
Sourcepub fn manifest_path(&self, tool_id: &str, version: &str) -> PathBuf
pub fn manifest_path(&self, tool_id: &str, version: &str) -> PathBuf
<root>/tools/<tool_id>/<version>/manifest.toml
Sourcepub fn index_dir(&self, index_name: &str) -> PathBuf
pub fn index_dir(&self, index_name: &str) -> PathBuf
<root>/index/<index_name>/ - local clones of git registries.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CacheLayout
impl RefUnwindSafe for CacheLayout
impl Send for CacheLayout
impl Sync for CacheLayout
impl Unpin for CacheLayout
impl UnsafeUnpin for CacheLayout
impl UnwindSafe for CacheLayout
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