Struct cargo::core::features::CliUnstable

source ·
pub struct CliUnstable {
Show 37 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_std: Option<Vec<String>>, pub build_std_features: Option<Vec<String>>, pub cargo_lints: bool, pub codegen_backend: bool, pub config_include: bool, pub direct_minimal_versions: bool, pub doctest_xcompile: bool, pub dual_proc_macros: bool, pub features: Option<Vec<String>>, 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_index_update: bool, pub panic_abort_tests: bool, pub profile_rustflags: bool, pub public_dependency: bool, pub publish_timeout: bool, pub rustdoc_map: bool, pub rustdoc_scrape_examples: bool, pub script: bool, pub separate_nightlies: bool, pub skip_rustdoc_fingerprint: bool, pub target_applies_to_host: bool, pub trim_paths: bool, pub unstable_options: 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: bool

Allows authenticating with asymmetric tokens

§avoid_dev_deps: bool

Avoid installing dev-dependencies if possible

§binary_dep_depinfo: bool

Track changes to dependency artifacts

§bindeps: bool

Allow Cargo packages to depend on bin, cdylib, and staticlib crates, and use the artifacts built by those crates

§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: bool

Enable the [lints.cargo] table

§codegen_backend: bool

Enable the codegen-backend option in profiles in .cargo/config.toml file

§config_include: bool

Enable the include key in config files

§direct_minimal_versions: bool

Resolve minimal dependency versions instead of maximum (direct dependencies only)

§doctest_xcompile: bool

Compile and run doctests for non-host target using runner config

§dual_proc_macros: bool

Build proc-macros for both the host and the target

§features: Option<Vec<String>>§gc: bool

Track 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: bool

Enable the [host] section in the .cargo/config.toml file

§minimal_versions: bool

Resolve minimal dependency versions instead of maximum

§msrv_policy: bool

Enable rust-version aware policy within cargo

§mtime_on_use: bool

Configure Cargo to update the mtime of used files

§next_lockfile_bump: bool§no_index_update: bool

Do not update the registry index even if the cache is outdated

§panic_abort_tests: bool

Enable support to run tests with -Cpanic=abort

§profile_rustflags: bool

Enable the rustflags option in profiles in .cargo/config.toml file

§public_dependency: bool

Respect a dependency’s public field in Cargo.toml to control public/private dependencies

§publish_timeout: bool

Enable the publish.timeout key in .cargo/config.toml file

§rustdoc_map: bool

Allow passing external documentation mappings to rustdoc

§rustdoc_scrape_examples: bool

Allows Rustdoc to scrape code examples from reverse-dependencies

§script: bool

Enable support for single-file, .rs packages

§separate_nightlies: bool§skip_rustdoc_fingerprint: bool§target_applies_to_host: bool

Enable the target-applies-to-host key in the .cargo/config.toml file

§trim_paths: bool

Enable the trim-paths option in profiles

§unstable_options: bool

Allow the usage of unstable options

Implementations§

source§

impl CliUnstable

source

pub fn help() -> Vec<(&'static str, Option<&'static str>)>

Returns a list of (<option-name>, <help-text>).

source§

impl CliUnstable

source

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 alreardy been stabilized.

source

fn add(&mut self, flag: &str, warnings: &mut Vec<String>) -> CargoResult<()>

source

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.

source

pub fn fail_if_stable_opt_custom_z( &self, flag: &str, issue: u32, z_name: &str, enabled: bool ) -> CargoResult<()>

source

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

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for CliUnstable

source§

fn default() -> CliUnstable

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

impl<'de> Deserialize<'de> for CliUnstable

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

§

impl<T> Pointable for T

§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

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: 144 bytes