pub enum CompileMode {
Test,
Build,
Check {
test: bool,
},
Doc,
Doctest,
Docscrape,
RunCustomBuild,
}
Expand description
The specific action to be performed on each Unit
of work.
Variants§
Test
Test with rustc
.
Build
Compile with rustc
.
Check
Type-check with rustc
by emitting rmeta
metadata only.
If test
is true, then it is also compiled with --test
to check it like
a test.
Doc
Document with rustdoc
.
Doctest
Test with rustdoc
.
Docscrape
Scrape for function calls by rustdoc
.
RunCustomBuild
Execute the binary built from the build.rs
script.
Implementations§
Source§impl CompileMode
impl CompileMode
Sourcepub fn is_doc_test(self) -> bool
pub fn is_doc_test(self) -> bool
Returns true
if this a doc test.
Sourcepub fn is_doc_scrape(self) -> bool
pub fn is_doc_scrape(self) -> bool
Returns true
if this is scraping examples for documentation.
Sourcepub fn is_any_test(self) -> bool
pub fn is_any_test(self) -> bool
Returns true
if this is any type of test (test, benchmark, doc test, or
check test).
Sourcepub fn is_rustc_test(self) -> bool
pub fn is_rustc_test(self) -> bool
Returns true
if this is something that passes --test
to rustc.
Sourcepub fn is_run_custom_build(self) -> bool
pub fn is_run_custom_build(self) -> bool
Returns true
if this is the execution of a build.rs
script.
Sourcepub fn generates_executable(self) -> bool
pub fn generates_executable(self) -> bool
Returns true
if this mode may generate an executable.
Note that this also returns true
for building libraries, so you also
have to check the target.
Trait Implementations§
Source§impl Clone for CompileMode
impl Clone for CompileMode
Source§fn clone(&self) -> CompileMode
fn clone(&self) -> CompileMode
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for CompileMode
impl Debug for CompileMode
Source§impl Hash for CompileMode
impl Hash for CompileMode
Source§impl Ord for CompileMode
impl Ord for CompileMode
Source§fn cmp(&self, other: &CompileMode) -> Ordering
fn cmp(&self, other: &CompileMode) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for CompileMode
impl PartialEq for CompileMode
Source§impl PartialOrd for CompileMode
impl PartialOrd for CompileMode
Source§impl Serialize for CompileMode
impl Serialize for CompileMode
impl Copy for CompileMode
impl Eq for CompileMode
impl StructuralPartialEq for CompileMode
Auto Trait Implementations§
impl Freeze for CompileMode
impl RefUnwindSafe for CompileMode
impl Send for CompileMode
impl Sync for CompileMode
impl Unpin for CompileMode
impl UnwindSafe for CompileMode
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§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
Source§impl<T> Serialize for T
impl<T> Serialize for T
fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<(), Error>
fn do_erased_serialize( &self, serializer: &mut dyn Serializer, ) -> Result<(), ErrorImpl>
§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> 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: 1 byte
Size for each variant:
Test
: 0 bytesBuild
: 0 bytesCheck
: 1 byteDoc
: 0 bytesDoctest
: 0 bytesDocscrape
: 0 bytesRunCustomBuild
: 0 bytes