[−][src]Struct rustwide::Build
API to interact with a running build.
This is created from BuildDirectory::build
Implementations
impl<'ws> Build<'ws>
[src]
pub fn cmd<'pl, R: Runnable>(&self, bin: R) -> Command<'ws, 'pl>
[src]
Run a command inside the sandbox.
Any cargo
invocation will automatically be configured to use a target directory mounted
outside the sandbox. The crate's source directory will be the working directory for the
command.
Example
let mut build_dir = workspace.build_dir("foo"); build_dir.build(&toolchain, &krate, sandbox).run(|build| { build.cmd("rustfmt").args(&["--check", "src/main.rs"]).run()?; Ok(()) })?;
pub fn cargo<'pl>(&self) -> Command<'ws, 'pl>
[src]
Run cargo
inside the sandbox, using the toolchain chosen for the build.
cargo
will automatically be configured to use a target directory mounted outside the
sandbox. The crate's source directory will be the working directory for the command.
Example
let mut build_dir = workspace.build_dir("foo"); build_dir.build(&toolchain, &krate, sandbox).run(|build| { build.cargo().args(&["test", "--all"]).run()?; Ok(()) })?;
pub fn host_source_dir(&self) -> PathBuf
[src]
Get the path to the source code on the host machine (outside the sandbox).
pub fn host_target_dir(&self) -> PathBuf
[src]
Get the path to the target directory on the host machine (outside the sandbox).
Auto Trait Implementations
impl<'ws> !RefUnwindSafe for Build<'ws>
impl<'ws> Send for Build<'ws>
impl<'ws> Sync for Build<'ws>
impl<'ws> Unpin for Build<'ws>
impl<'ws> !UnwindSafe for Build<'ws>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,