pub struct CacheDir { /* private fields */ }
Expand description
Base directory for cached spack installs.
Implementations§
Source§impl CacheDir
impl CacheDir
Sourcepub async fn get_or_create() -> Result<Self, SummoningError>
pub async fn get_or_create() -> Result<Self, SummoningError>
Goes to ~/.spack/summonings
.
Name intentionally chosen to be overridden later after upstreaming to spack (?).
pub fn location(&self) -> &Path
Sourcepub fn dirname(&self) -> String
pub fn dirname(&self) -> String
We use the hex-encoded checksum value as the ultimate directory name.
Sourcepub fn unpacking_path(&self) -> PathBuf
pub fn unpacking_path(&self) -> PathBuf
The path to unpack the tar archive into.
Sourcepub fn tarball_path(&self) -> PathBuf
pub fn tarball_path(&self) -> PathBuf
The path to download the release tarball to.
Sourcepub fn repo_root(&self) -> PathBuf
pub fn repo_root(&self) -> PathBuf
The path to the root of the spack repo, through a symlink.
FIXME: Note that this repeats the
PATCHES_TOPLEVEL_COMPONENT
component
used in Self::unpacking_path
.
Sourcepub fn spack_script(&self) -> PathBuf
pub fn spack_script(&self) -> PathBuf
The path to the spack script in the spack repo, through a symlink.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CacheDir
impl RefUnwindSafe for CacheDir
impl Send for CacheDir
impl Sync for CacheDir
impl Unpin for CacheDir
impl UnwindSafe for CacheDir
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more