[−][src]Enum cargo::util::command_prelude::CompileMode
The general "mode" of what to do.
This is used for two purposes. The commands themselves pass this in to
compile_ws
to tell it the general execution strategy. This influences
the default targets selected. The other use is in the Unit
struct
to indicate what is being done with a specific target.
Variants
Test
A target being built for a test.
Build
Building a target with rustc
(lib or bin).
Check
Building a target with rustc
to emit rmeta
metadata only. If
test
is true, then it is also compiled with --test
to check it like
a test.
Fields of Check
test: bool
Bench
Used to indicate benchmarks should be built. This is not used in
Target
because it is essentially the same as Test
(indicating
--test
should be passed to rustc) and by using Test
instead it
allows some de-duping of Units to occur.
Doc
A target that will be documented with rustdoc
.
If deps
is true, then it will also document all dependencies.
Fields of Doc
deps: bool
Doctest
A target that will be tested with rustdoc
.
RunCustomBuild
A marker for Units that represent the execution of a build.rs
script.
Methods
impl CompileMode
[src]
pub fn is_check(self) -> bool
[src]
Returns true if the unit is being checked.
pub fn is_doc(self) -> bool
[src]
Returns true if this is a doc or doctest. Be careful using this. Although both run rustdoc, the dependencies for those two modes are very different.
pub fn is_any_test(self) -> bool
[src]
Returns true if this is any type of test (test, benchmark, doctest, or check-test).
pub fn is_run_custom_build(self) -> bool
[src]
Returns true if this is the execution of a build.rs
script.
pub fn all_modes() -> &'static [CompileMode]
[src]
List of all modes (currently used by cargo clean -p
for computing
all possible outputs).
Trait Implementations
impl PartialOrd<CompileMode> for CompileMode
[src]
fn partial_cmp(&self, other: &CompileMode) -> Option<Ordering>
[src]
fn lt(&self, other: &CompileMode) -> bool
[src]
fn le(&self, other: &CompileMode) -> bool
[src]
fn gt(&self, other: &CompileMode) -> bool
[src]
fn ge(&self, other: &CompileMode) -> bool
[src]
impl Copy for CompileMode
[src]
impl PartialEq<CompileMode> for CompileMode
[src]
fn eq(&self, other: &CompileMode) -> bool
[src]
fn ne(&self, other: &CompileMode) -> bool
[src]
impl Clone for CompileMode
[src]
fn clone(&self) -> CompileMode
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Ord for CompileMode
[src]
fn cmp(&self, other: &CompileMode) -> Ordering
[src]
fn max(self, other: Self) -> Self
1.21.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
Compares and returns the minimum of two values. Read more
impl Eq for CompileMode
[src]
impl Debug for CompileMode
[src]
impl Hash for CompileMode
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Serialize for CompileMode
[src]
Auto Trait Implementations
impl Send for CompileMode
impl Sync for CompileMode
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Same for T
type Output = T
Should always be Self