Struct rustwide::BuildBuilder[][src]

pub struct BuildBuilder<'a> { /* fields omitted */ }
Expand description

Builder for configuring builds in a BuildDirectory.

Implementations

Add a patch to this build. Patches get added to the crate’s Cargo.toml in the patch.crates-io table.

Example

let mut build_dir = workspace.build_dir("foo");
build_dir.build(&toolchain, &krate, sandbox)
    .patch_with_git("bar", "https://github.com/foo/bar", "baz")
    .run(|build| {
        build.cargo().args(&["test", "--all"]).run()?;
        Ok(())
    })?;

Run a sandboxed build of the provided crate with the provided toolchain. The closure will be provided an instance of Build that allows spawning new processes inside the sandbox.

All the state will be kept on disk as long as the closure doesn’t exit: after that things might be removed.

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

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.