Struct elba::retrieve::cache::Cache [−][src]
The Cache encapsulates all of the global state required for elba
to function.
This global state includes stuff like temporary places to download and build packages, places to store indices of packages, etc.
Note that a Cache can be located anywhere, including in the current directory!
Fields
layout: Layout
logger: Logger
Methods
impl Cache
[src]
impl Cache
pub fn from_disk(plog: &Logger, location: &Path) -> Res<Self>
[src]
pub fn from_disk(plog: &Logger, location: &Path) -> Res<Self>
pub fn checkout_source(
&self,
pkg: &PackageId,
loc: &DirectRes
) -> Result<Source, Error>
[src]
pub fn checkout_source(
&self,
pkg: &PackageId,
loc: &DirectRes
) -> Result<Source, Error>
Retrieve the metadata of a package, loading it into the cache if necessary.
pub fn checkout_build(&self, hash: &BuildHash) -> Res<Option<Binary>>
[src]
pub fn checkout_build(&self, hash: &BuildHash) -> Res<Option<Binary>>
If the build directory exists, returns it. Otherwise, give up and return None
pub fn checkout_tmp(&self, hash: &BuildHash) -> Res<OutputLayout>
[src]
pub fn checkout_tmp(&self, hash: &BuildHash) -> Res<OutputLayout>
Returns a lock on a temporary build directory. Note that the format of this directory should be an OutputLayout.
pub fn store_bins(&self, bins: &[(PathBuf, String)], force: bool) -> Res<()>
[src]
pub fn store_bins(&self, bins: &[(PathBuf, String)], force: bool) -> Res<()>
pub fn remove_bins(&self, query: &Spec, bins: &[&str]) -> Res<u32>
[src]
pub fn remove_bins(&self, query: &Spec, bins: &[&str]) -> Res<u32>
pub fn store_build(&self, from: &Path, hash: &BuildHash) -> Res<Binary>
[src]
pub fn store_build(&self, from: &Path, hash: &BuildHash) -> Res<Binary>
pub fn get_indices(&self, index_reses: &[DirectRes]) -> Indices
[src]
pub fn get_indices(&self, index_reses: &[DirectRes]) -> Indices
Trait Implementations
impl Debug for Cache
[src]
impl Debug for Cache
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Clone for Cache
[src]
impl Clone for Cache