Struct cage::Source
[−]
[src]
pub struct Source { /* fields omitted */ }
A single source tree.
Methods
impl Source
[src]
fn alias(&self) -> &str
A short local name for this source tree, suitable for use as a directory name or command-line argument.
fn context(&self) -> &Context
The remote git URL from which we can clone this source tree.
fn mounted(&self) -> bool
Should this source tree be mounted into the appropriate containers?
fn set_mounted(&mut self, mounted: bool)
Set whether this source tree should be mounted into the appropriate containers?
fn path(&self, project: &Project) -> PathBuf
The full path to where we expect any local copies of this code to
live. This will either be the location where we will check out a
git repository, or the path to the actual source tree, depending on
what type of Context
object we're dealing with.
The project
argument is mandatory because we can't store a pointer
to it without creating a circular reference loop.
fn is_available_locally(&self, project: &Project) -> bool
Has this project been cloned locally?
fn clone_source<CR>(&self, runner: &CR, project: &Project) -> Result<()> where CR: CommandRunner
Clone the source code of this repository using git.