pub struct CliUnstable {Show 49 fields
pub allow_features: Option<AllowFeatures>,
pub print_im_a_teapot: bool,
pub advanced_env: bool,
pub asymmetric_token: bool,
pub avoid_dev_deps: bool,
pub binary_dep_depinfo: bool,
pub bindeps: bool,
pub build_analysis: bool,
pub build_dir_new_layout: bool,
pub build_std: Option<Vec<String>>,
pub build_std_features: Option<Vec<String>>,
pub cargo_lints: bool,
pub checksum_freshness: bool,
pub codegen_backend: bool,
pub config_include: bool,
pub direct_minimal_versions: bool,
pub dual_proc_macros: bool,
pub feature_unification: bool,
pub features: Option<Vec<String>>,
pub fix_edition: Option<FixEdition>,
pub gc: bool,
pub git: Option<GitFeatures>,
pub gitoxide: Option<GitoxideFeatures>,
pub host_config: bool,
pub minimal_versions: bool,
pub msrv_policy: bool,
pub mtime_on_use: bool,
pub next_lockfile_bump: bool,
pub no_embed_metadata: bool,
pub no_index_update: bool,
pub panic_abort_tests: bool,
pub panic_immediate_abort: bool,
pub profile_hint_mostly_unused: bool,
pub profile_rustflags: bool,
pub public_dependency: bool,
pub publish_timeout: bool,
pub root_dir: Option<PathBuf>,
pub rustdoc_depinfo: bool,
pub rustdoc_map: bool,
pub rustdoc_scrape_examples: bool,
pub sbom: bool,
pub script: bool,
pub section_timings: bool,
pub separate_nightlies: bool,
pub skip_rustdoc_fingerprint: bool,
pub target_applies_to_host: bool,
pub trim_paths: bool,
pub unstable_options: bool,
pub warnings: bool,
}Expand description
A parsed representation of all unstable flags that Cargo accepts.
Cargo, like rustc, accepts a suite of -Z flags which are intended for
gating unstable functionality to Cargo. These flags are only available on
the nightly channel of Cargo.
Fields§
§allow_features: Option<AllowFeatures>Allow only the listed unstable features
print_im_a_teapot: bool§advanced_env: bool§asymmetric_token: boolAllows authenticating with asymmetric tokens
avoid_dev_deps: boolAvoid installing dev-dependencies if possible
binary_dep_depinfo: boolTrack changes to dependency artifacts
bindeps: boolAllow Cargo packages to depend on bin, cdylib, and staticlib crates, and use the artifacts built by those crates
build_analysis: boolRecord and persist build metrics across runs, with commands to query past builds.
build_dir_new_layout: boolUse the new build-dir filesystem layout
build_std: Option<Vec<String>>Enable Cargo to compile the standard library itself as part of a crate graph compilation
build_std_features: Option<Vec<String>>Configure features enabled for the standard library itself when building the standard library
cargo_lints: boolEnable the [lints.cargo] table
checksum_freshness: boolUse a checksum to determine if output is fresh rather than filesystem mtime
codegen_backend: boolEnable the codegen-backend option in profiles in .cargo/config.toml file
config_include: boolEnable the include key in config files
direct_minimal_versions: boolResolve minimal dependency versions instead of maximum (direct dependencies only)
dual_proc_macros: boolBuild proc-macros for both the host and the target
feature_unification: boolEnable new feature unification modes in workspaces
features: Option<Vec<String>>§fix_edition: Option<FixEdition>Permanently unstable edition migration helper
gc: boolTrack cache usage and “garbage collect” unused files
git: Option<GitFeatures>Enable support for shallow git fetch operations
gitoxide: Option<GitoxideFeatures>Use gitoxide for the given git interactions, or all of them if no argument is given
host_config: boolEnable the [host] section in the .cargo/config.toml file
minimal_versions: boolResolve minimal dependency versions instead of maximum
msrv_policy: boolEnable rust-version aware policy within cargo
mtime_on_use: boolConfigure Cargo to update the mtime of used files
next_lockfile_bump: bool§no_embed_metadata: boolAvoid embedding metadata in library artifacts
no_index_update: boolDo not update the registry index even if the cache is outdated
panic_abort_tests: boolEnable support to run tests with -Cpanic=abort
panic_immediate_abort: boolEnable setting panic = "immediate-abort" in profiles
profile_hint_mostly_unused: boolEnable the hint-mostly-unused setting in profiles to mark a crate as mostly unused.
profile_rustflags: boolEnable the rustflags option in profiles in .cargo/config.toml file
public_dependency: boolRespect a dependency’s public field in Cargo.toml to control public/private dependencies
publish_timeout: boolEnable the publish.timeout key in .cargo/config.toml file
root_dir: Option<PathBuf>Set the root directory relative to which paths are printed (defaults to workspace root)
rustdoc_depinfo: boolUse dep-info files in rustdoc rebuild detection
rustdoc_map: boolAllow passing external documentation mappings to rustdoc
rustdoc_scrape_examples: boolAllows Rustdoc to scrape code examples from reverse-dependencies
sbom: boolEnable the sbom option in build config in .cargo/config.toml file
script: boolEnable support for single-file, .rs packages
section_timings: boolEnable support for extended compilation sections in –timings output
separate_nightlies: bool§skip_rustdoc_fingerprint: bool§target_applies_to_host: boolEnable the target-applies-to-host key in the .cargo/config.toml file
trim_paths: boolEnable the trim-paths option in profiles
unstable_options: boolAllow the usage of unstable options
warnings: boolAllow use of the build.warnings config key
Implementations§
Source§impl CliUnstable
impl CliUnstable
Source§impl CliUnstable
impl CliUnstable
Sourcepub fn parse(
&mut self,
flags: &[String],
nightly_features_allowed: bool,
) -> CargoResult<Vec<String>>
pub fn parse( &mut self, flags: &[String], nightly_features_allowed: bool, ) -> CargoResult<Vec<String>>
Parses -Z flags from the command line, and returns messages that warn
if any flag has already been stabilized.
fn add(&mut self, flag: &str, warnings: &mut Vec<String>) -> CargoResult<()>
Sourcepub fn fail_if_stable_opt(&self, flag: &str, issue: u32) -> CargoResult<()>
pub fn fail_if_stable_opt(&self, flag: &str, issue: u32) -> CargoResult<()>
Generates an error if -Z unstable-options was not used for a new,
unstable command-line flag.
pub fn fail_if_stable_opt_custom_z( &self, flag: &str, issue: u32, z_name: &str, enabled: bool, ) -> CargoResult<()>
Sourcepub fn fail_if_stable_command(
&self,
gctx: &GlobalContext,
command: &str,
issue: u32,
z_name: &str,
enabled: bool,
) -> CargoResult<()>
pub fn fail_if_stable_command( &self, gctx: &GlobalContext, command: &str, issue: u32, z_name: &str, enabled: bool, ) -> CargoResult<()>
Generates an error if -Z unstable-options was not used for a new,
unstable subcommand.
Trait Implementations§
Source§impl Debug for CliUnstable
impl Debug for CliUnstable
Source§impl Default for CliUnstable
impl Default for CliUnstable
Source§fn default() -> CliUnstable
fn default() -> CliUnstable
Source§impl<'de> Deserialize<'de> for CliUnstablewhere
CliUnstable: Default,
impl<'de> Deserialize<'de> for CliUnstablewhere
CliUnstable: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for CliUnstable
impl RefUnwindSafe for CliUnstable
impl Send for CliUnstable
impl Sync for CliUnstable
impl Unpin for CliUnstable
impl UnwindSafe for CliUnstable
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<T> ErasedDestructor for Twhere
T: 'static,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 176 bytes