Struct mc_build_rs::CargoBuilder
source · pub struct CargoBuilder { /* private fields */ }
Expand description
A builder-pattern which constructs a command to invoke cargo build
Implementations§
source§impl CargoBuilder
impl CargoBuilder
sourcepub fn new(env: &Environment, working_dir: &Path, clean_env: bool) -> Self
pub fn new(env: &Environment, working_dir: &Path, clean_env: bool) -> Self
Construct a new builder instance to run cargo in the given directory.
If clean_env is set, cargo configuration variables will not be passed through from the command.
sourcepub fn cargo_path(&mut self, cargo: &Path) -> &mut Self
pub fn cargo_path(&mut self, cargo: &Path) -> &mut Self
Set the path to the cargo executable
sourcepub fn home(&mut self, home: &Path) -> &mut Self
pub fn home(&mut self, home: &Path) -> &mut Self
Set the CARGO_HOME variable for invoking cargo
sourcepub fn target_dir(&mut self, target_dir: &Path) -> &mut Self
pub fn target_dir(&mut self, target_dir: &Path) -> &mut Self
Set the CARGO_TARGET_DIR variable for invoking cargo
sourcepub fn rustc_wrapper(&mut self, rustc_wrapper: &Path) -> &mut Self
pub fn rustc_wrapper(&mut self, rustc_wrapper: &Path) -> &mut Self
Set the RUSTC_WRAPPER variable for invoking cargo
sourcepub fn rustdoc(&mut self, rustdoc: &Path) -> &mut Self
pub fn rustdoc(&mut self, rustdoc: &Path) -> &mut Self
Set the RUSTDOC variable when invoking cargo
sourcepub fn add_rustdoc_flag(&mut self, rustdoc_flag: &str) -> &mut Self
pub fn add_rustdoc_flag(&mut self, rustdoc_flag: &str) -> &mut Self
Add an item to the RUSTDOCFLAGS environment string
sourcepub fn add_rustdoc_flags(&mut self, rustdoc_flags: &[&str]) -> &mut Self
pub fn add_rustdoc_flags(&mut self, rustdoc_flags: &[&str]) -> &mut Self
Add multiple items to the RUSTDOCFLAGS environment string
sourcepub fn add_rust_flag(&mut self, rust_flag: &str) -> &mut Self
pub fn add_rust_flag(&mut self, rust_flag: &str) -> &mut Self
Add an item to the RUSTFLAGS environment string
sourcepub fn add_rust_flags(&mut self, rust_flags: &[&str]) -> &mut Self
pub fn add_rust_flags(&mut self, rust_flags: &[&str]) -> &mut Self
Add multiple items to the RUSTFLAGS environment string
sourcepub fn incremental(&mut self, incremental: bool) -> &mut Self
pub fn incremental(&mut self, incremental: bool) -> &mut Self
Explicitly set whether incremental builds are enabled or disabled
sourcepub fn cache_rustc_info(&mut self, cache_rustc_info: bool) -> &mut Self
pub fn cache_rustc_info(&mut self, cache_rustc_info: bool) -> &mut Self
Enable/disable whether or not cargo should cache rust info
sourcepub fn build_jobs(&mut self, build_jobs: u64) -> &mut Self
pub fn build_jobs(&mut self, build_jobs: u64) -> &mut Self
Override the build.jobs
configuration option
sourcepub fn target(&mut self, target: &str) -> &mut Self
pub fn target(&mut self, target: &str) -> &mut Self
Override the build.target
configuration option
sourcepub fn dep_info_basedir(&mut self, dep_info_basedir: &Path) -> &mut Self
pub fn dep_info_basedir(&mut self, dep_info_basedir: &Path) -> &mut Self
Override the build.dep-info-basedir
configuration option
sourcepub fn pipelining(&mut self, pipelining: bool) -> &mut Self
pub fn pipelining(&mut self, pipelining: bool) -> &mut Self
Override the build.pipelining
configuration option
sourcepub fn http_debug(&mut self, http_debug: bool) -> &mut Self
pub fn http_debug(&mut self, http_debug: bool) -> &mut Self
Override the http.debug
configuration option
sourcepub fn http_proxy(&mut self, http_proxy: &str) -> &mut Self
pub fn http_proxy(&mut self, http_proxy: &str) -> &mut Self
Override the http.proxy
configuration option
sourcepub fn http_timeout(&mut self, http_timeout: Duration) -> &mut Self
pub fn http_timeout(&mut self, http_timeout: Duration) -> &mut Self
Override the http.debug
configuration option
sourcepub fn http_cainfo(&mut self, http_cainfo: &Path) -> &mut Self
pub fn http_cainfo(&mut self, http_cainfo: &Path) -> &mut Self
Override the http.cainfo
file configuration option
sourcepub fn http_check_revoke(&mut self, http_check_revoke: bool) -> &mut Self
pub fn http_check_revoke(&mut self, http_check_revoke: bool) -> &mut Self
Override the http.check-revoke
configuration option
sourcepub fn http_ssl_version(&mut self, http_ssl_version: &str) -> &mut Self
pub fn http_ssl_version(&mut self, http_ssl_version: &str) -> &mut Self
Override the http.ssl-version
configuration option
sourcepub fn http_low_speed_limit(&mut self, http_low_speed_limit: u64) -> &mut Self
pub fn http_low_speed_limit(&mut self, http_low_speed_limit: u64) -> &mut Self
Override the http.low-speed-limit
configuration option
sourcepub fn http_multiplexing(&mut self, http_multiplexing: bool) -> &mut Self
pub fn http_multiplexing(&mut self, http_multiplexing: bool) -> &mut Self
Override the http.multiplexing
configuration option
sourcepub fn http_user_agent(&mut self, http_user_agent: String) -> &mut Self
pub fn http_user_agent(&mut self, http_user_agent: String) -> &mut Self
Override the http.user-agent
configuration option
sourcepub fn net_retry(&mut self, net_retry: u64) -> &mut Self
pub fn net_retry(&mut self, net_retry: u64) -> &mut Self
Override the net.retry
configuration option
sourcepub fn net_git_fetch_with_cli(
&mut self,
net_git_fetch_with_cli: bool
) -> &mut Self
pub fn net_git_fetch_with_cli( &mut self, net_git_fetch_with_cli: bool ) -> &mut Self
Override the net.get_fetch_with_cli
configuration option
sourcepub fn net_offline(&mut self, net_offline: bool) -> &mut Self
pub fn net_offline(&mut self, net_offline: bool) -> &mut Self
Override the net.offline
configuration option
sourcepub fn add_registry(&mut self, name: String, index: Url) -> &mut Self
pub fn add_registry(&mut self, name: String, index: Url) -> &mut Self
Add a new crates.io-style registry to this invocation of cargo
sourcepub fn term_verbose(&mut self, term_verbose: bool) -> &mut Self
pub fn term_verbose(&mut self, term_verbose: bool) -> &mut Self
Sets whether to use verbose stdout in the cargo run
sourcepub fn term_color(&mut self, term_color: bool) -> &mut Self
pub fn term_color(&mut self, term_color: bool) -> &mut Self
Sets whether to output terminal colors
Trait Implementations§
source§impl Clone for CargoBuilder
impl Clone for CargoBuilder
source§fn clone(&self) -> CargoBuilder
fn clone(&self) -> CargoBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more