pub struct BuildDirectory { /* private fields */ }
Expand description
Directory in the Workspace
where builds can be executed.
The build directory contains the source code of the crate being built and the target directory used by cargo to store build artifacts. If multiple builds are executed in the same build directory they will share the target directory.
Implementations§
Source§impl BuildDirectory
impl BuildDirectory
Sourcepub fn build<'a>(
&'a mut self,
toolchain: &'a Toolchain,
krate: &'a Crate,
sandbox: SandboxBuilder,
) -> BuildBuilder<'a>
pub fn build<'a>( &'a mut self, toolchain: &'a Toolchain, krate: &'a Crate, sandbox: SandboxBuilder, ) -> BuildBuilder<'a>
Create a build in this build directory. Returns a builder that can be used to configure the build and run it.
§Example
let mut build_dir = workspace.build_dir("foo");
build_dir.build(&toolchain, &krate, sandbox).run(|build| {
build.cargo().args(&["test", "--all"]).run()?;
Ok(())
})?;
Auto Trait Implementations§
impl Freeze for BuildDirectory
impl RefUnwindSafe for BuildDirectory
impl Send for BuildDirectory
impl Sync for BuildDirectory
impl Unpin for BuildDirectory
impl UnwindSafe for BuildDirectory
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