pub struct Build {
Show 18 fields pub common: CommonOptions, pub packages: Vec<String>, pub workspace: bool, pub exclude: Vec<String>, pub all: bool, pub lib: bool, pub bin: Vec<String>, pub bins: bool, pub example: Vec<String>, pub examples: bool, pub test: Vec<String>, pub tests: bool, pub bench: Vec<String>, pub benches: bool, pub all_targets: bool, pub out_dir: Option<PathBuf>, pub build_plan: bool, pub future_incompat_report: bool,
}
Expand description

Compile a local package and all of its dependencies

Fields

common: CommonOptionspackages: Vec<String>

Package to build (see cargo help pkgid)

workspace: bool

Build all packages in the workspace

exclude: Vec<String>

Exclude packages from the build

all: bool

Alias for workspace (deprecated)

lib: bool

Build only this package’s library

bin: Vec<String>

Build only the specified binary

bins: bool

Build all binaries

example: Vec<String>

Build only the specified example

examples: bool

Build all examples

test: Vec<String>

Build only the specified test target

tests: bool

Build all tests

bench: Vec<String>

Build only the specified bench target

benches: bool

Build all benches

all_targets: bool

Build all targets

out_dir: Option<PathBuf>

Copy final artifacts to this directory (unstable)

build_plan: bool

Output the build plan in JSON (unstable)

future_incompat_report: bool

Outputs a future incompatibility report at the end of the build (unstable)

Implementations

Build a cargo build command

Methods from Deref<Target = CommonOptions>

Apply options to Command

Trait Implementations

Append to Command so it can instantiate Self. Read more

Append to Command so it can update self. Read more

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Deprecated, replaced with CommandFactory::command

Deprecated, replaced with CommandFactory::command_for_update

Build a Command that can instantiate Self. Read more

Build a Command that can update self. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

The resulting type after dereferencing.

Dereferences the value.

Mutably dereferences the value.

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more

Assign values from ArgMatches to self.

Assign values from ArgMatches to self.

Parse from std::env::args_os(), exit on error

Parse from std::env::args_os(), return Err on error.

Parse from iterator, exit on error

Parse from iterator, return Err on error.

Update from iterator, exit on error

Update from iterator, return Err on error.

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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

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.