Struct cargo_options::CommonOptions

source ·
pub struct CommonOptions {
Show 18 fields pub quiet: bool, pub jobs: Option<usize>, pub keep_going: bool, pub profile: Option<String>, pub features: Vec<String>, pub all_features: bool, pub no_default_features: bool, pub target: Vec<String>, pub target_dir: Option<PathBuf>, pub message_format: Vec<String>, pub verbose: u8, pub color: Option<String>, pub frozen: bool, pub locked: bool, pub offline: bool, pub config: Vec<String>, pub unstable_flags: Vec<String>, pub timings: Option<Vec<String>>,
}
Expand description

common cargo options

Fields§

§quiet: bool

Do not print cargo log messages

§jobs: Option<usize>

Number of parallel jobs, defaults to # of CPUs

§keep_going: bool

Do not abort the build as soon as there is an error (unstable)

§profile: Option<String>

Build artifacts with the specified Cargo profile

§features: Vec<String>

Space or comma separated list of features to activate

§all_features: bool

Activate all available features

§no_default_features: bool

Do not activate the default feature

§target: Vec<String>

Build for the target triple

§target_dir: Option<PathBuf>

Directory for all generated artifacts

§message_format: Vec<String>

Error format

§verbose: u8

Use verbose output (-vv very verbose/build.rs output)

§color: Option<String>

Coloring: auto, always, never

§frozen: bool

Require Cargo.lock and cache are up to date

§locked: bool

Require Cargo.lock is up to date

§offline: bool

Run without accessing the network

§config: Vec<String>

Override a configuration value (unstable)

§unstable_flags: Vec<String>

Unstable (nightly-only) flags to Cargo, see ‘cargo -Z help’ for details

§timings: Option<Vec<String>>

Timing output formats (unstable) (comma separated): html, json

Implementations§

source§

impl CommonOptions

source

pub fn apply(&self, cmd: &mut Command)

Apply options to Command

Trait Implementations§

source§

impl Args for CommonOptions

source§

fn group_id() -> Option<Id>

Report the ArgGroup::id for this set of arguments
source§

fn augment_args<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate Self. Read more
source§

fn augment_args_for_update<'b>(__clap_app: Command) -> Command

Append to Command so it can update self. Read more
source§

impl Clone for CommonOptions

source§

fn clone(&self) -> CommonOptions

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl CommandFactory for CommonOptions

source§

fn command<'b>() -> Command

Build a Command that can instantiate Self. Read more
source§

fn command_for_update<'b>() -> Command

Build a Command that can update self. Read more
source§

impl Debug for CommonOptions

source§

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

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

impl Default for CommonOptions

source§

fn default() -> CommonOptions

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

impl FromArgMatches for CommonOptions

source§

fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>

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

fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches ) -> Result<Self, Error>

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

fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches ) -> Result<(), Error>

Assign values from ArgMatches to self.
source§

fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches ) -> Result<(), Error>

Assign values from ArgMatches to self.
source§

impl Parser for CommonOptions

source§

fn parse() -> Self

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

fn try_parse() -> Result<Self, Error>

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

fn parse_from<I, T>(itr: I) -> Self
where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

Parse from iterator, exit on error
source§

fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

Parse from iterator, return Err on error.
source§

fn update_from<I, T>(&mut self, itr: I)
where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

Update from iterator, exit on error
source§

fn try_update_from<I, T>(&mut self, itr: I) -> Result<(), Error>
where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

Update from iterator, return Err on error.

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.

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.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.