Struct CargoCmd

Source
pub struct CargoCmd {
Show 28 fields pub cargo_cmd: String, pub message_format: Option<String>, pub verbose: u8, pub quiet: bool, pub color: Option<String>, pub config: Option<String>, pub z: Option<String>, pub package: Option<String>, pub bin: Option<String>, pub example: Option<String>, pub features: Option<String>, pub all_features: bool, pub no_default_features: bool, pub jobs: Option<String>, pub keep_going: bool, pub release: bool, pub profile: Option<String>, pub target: Option<String>, pub target_dir: Option<String>, pub unit_graph: bool, pub timings: Option<String>, pub manifest_path: Option<String>, pub lockfile_path: Option<String>, pub ignore_rust_version: bool, pub locked: bool, pub offline: bool, pub frozen: bool, pub args: Vec<String>,
}
Expand description

Verbatim clone of cargo run args

Fields§

§cargo_cmd: String

Error format

§message_format: Option<String>§verbose: u8

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

§quiet: bool

Do not print cargo log messages

§color: Option<String>

Coloring: auto, always, never

§config: Option<String>

Override a configuration value

§z: Option<String>

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

§package: Option<String>

Package with the target to run

§bin: Option<String>

Name of the bin target to run

§example: Option<String>

Name of the example target to run

§features: Option<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

§jobs: Option<String>

Number of parallel jobs, defaults to # of CPUs.

§keep_going: bool

Do not abort the build as soon as there is an error

§release: bool

Build artifacts in release mode, with optimizations

§profile: Option<String>

Build artifacts with the specified profile

§target: Option<String>

Build for the target triple

§target_dir: Option<String>

Directory for all generated artifacts

§unit_graph: bool

Output build graph in JSON (unstable)

§timings: Option<String>

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

§manifest_path: Option<String>

Path to Cargo.toml

§lockfile_path: Option<String>

Path to Cargo.lock (unstable)

§ignore_rust_version: bool

Ignore rust-version specification in packages

§locked: bool

Assert that Cargo.lock will remain unchanged

§offline: bool

Run without accessing the network

§frozen: bool

Equivalent to specifying both –locked and –offline

§args: Vec<String>

Any additional arguments passed to cargo

Implementations§

Source§

impl CargoCmd

Source

pub fn exe_path(&self) -> PathBuf

Best effort attempt to retrieve the path to the executable. In the case of a wasm target, the path will have a .wasm extension.

Source

pub fn spawn(&self) -> Result<()>

Trait Implementations§

Source§

impl Args for CargoCmd

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 via FromArgMatches::from_arg_matches_mut Read more
Source§

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

Append to Command so it can instantiate self via FromArgMatches::update_from_arg_matches_mut Read more
Source§

impl Clone for CargoCmd

Source§

fn clone(&self) -> CargoCmd

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 CargoCmd

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 CargoCmd

Source§

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

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

impl Default for CargoCmd

Source§

fn default() -> Self

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

impl FromArgMatches for CargoCmd

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 CargoCmd

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. Read more
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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

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

Source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
Source§

impl<T> Instrument for T

Source§

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

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

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.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T, V> IntoMaybeSignal<T, IntoIntoMaybeSignalMarker> for V
where V: Into<T>,

Source§

impl<T> IntoRouteFunc<T, T> for T
where T: 'static,

Source§

impl<T> PipelineTarget for T

Source§

fn xmap<O>(self, func: impl FnOnce(Self) -> O) -> O

its like map but for any type
Source§

fn xtap(self, func: impl FnOnce(&mut Self)) -> Self

its like inpsect but for any type
Source§

fn xdebug(self) -> Self
where Self: Debug,

Source§

fn xdisplay(self) -> Self
where Self: Display,

Source§

fn xtap_mut(&mut self, func: impl FnOnce(&mut Self)) -> &mut Self

Source§

fn xpipe<P, O>(self, pipeline: P) -> O
where P: Pipeline<Self, O>,

its like map but for our pipeline trait
Source§

fn xref(&self) -> &Self

Source§

fn xok<E>(self) -> Result<Self, E>

Source§

fn xsome(self) -> Option<Self>

Source§

fn xinto<T>(self) -> T
where T: From<Self>,

Source§

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

Source§

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>,

Source§

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>,

Source§

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.
Source§

impl<T> WithSubscriber for T

Source§

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
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

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

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> MaybeSendSync for T