pub struct BuildDirLayout {
root: PathBuf,
deps: PathBuf,
build: PathBuf,
artifact: PathBuf,
incremental: PathBuf,
fingerprint: PathBuf,
examples: PathBuf,
tmp: PathBuf,
_lock: Option<FileLock>,
is_new_layout: bool,
}
Fields§
§root: PathBuf
The root directory: /path/to/build-dir
.
If cross compiling: /path/to/build-dir/$TRIPLE
.
deps: PathBuf
The directory with rustc artifacts
build: PathBuf
The primary directory for build files
artifact: PathBuf
The directory for artifacts, i.e. binaries, cdylibs, staticlibs
incremental: PathBuf
The directory for incremental files
fingerprint: PathBuf
The directory for fingerprints
examples: PathBuf
The directory for pre-uplifted examples: build-dir/debug/examples
tmp: PathBuf
The directory for temporary data of integration tests and benches
_lock: Option<FileLock>
The lockfile for a build (.cargo-lock
). Will be unlocked when this
struct is drop
ped.
Will be None
when the build-dir and target-dir are the same path as we cannot
lock the same path twice.
is_new_layout: bool
Implementations§
Source§impl BuildDirLayout
impl BuildDirLayout
Sourcepub fn prepare(&mut self) -> CargoResult<()>
pub fn prepare(&mut self) -> CargoResult<()>
Makes sure all directories stored in the Layout exist on the filesystem.
Sourcepub fn legacy_deps(&self) -> &Path
pub fn legacy_deps(&self) -> &Path
Fetch the deps path. (old layout)
pub fn root(&self) -> &Path
Sourcepub fn incremental(&self) -> &Path
pub fn incremental(&self) -> &Path
Fetch the incremental path.
Sourcepub fn fingerprint(&self, pkg_dir: &str) -> PathBuf
pub fn fingerprint(&self, pkg_dir: &str) -> PathBuf
Fetch the fingerprint path.
Sourcepub fn legacy_fingerprint(&self) -> &Path
pub fn legacy_fingerprint(&self) -> &Path
Fetch the fingerprint path. (old layout)
Sourcepub fn build_script(&self, pkg_dir: &str) -> PathBuf
pub fn build_script(&self, pkg_dir: &str) -> PathBuf
Fetch the build script path.
Sourcepub fn build_script_execution(&self, pkg_dir: &str) -> PathBuf
pub fn build_script_execution(&self, pkg_dir: &str) -> PathBuf
Fetch the build script execution path.
Sourcepub fn build_unit(&self, pkg_dir: &str) -> PathBuf
pub fn build_unit(&self, pkg_dir: &str) -> PathBuf
Fetch the build unit path
Sourcepub fn prepare_tmp(&self) -> CargoResult<&Path>
pub fn prepare_tmp(&self) -> CargoResult<&Path>
Create and return the tmp path.
Auto Trait Implementations§
impl Freeze for BuildDirLayout
impl RefUnwindSafe for BuildDirLayout
impl Send for BuildDirLayout
impl Sync for BuildDirLayout
impl Unpin for BuildDirLayout
impl UnwindSafe for BuildDirLayout
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
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>
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§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
impl<T> ErasedDestructor for Twhere
T: 'static,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 232 bytes