pub enum UserIntent {
Bench,
Build,
Check {
test: bool,
},
Doc {
deps: bool,
json: bool,
},
Doctest,
Test,
}
Expand description
Represents the high-level operation requested by the user.
It determines which “Cargo targets” are selected by default and influences
how they will be processed. This is derived from the Cargo command the user
invoked (like cargo build
or cargo test
).
Unlike CompileMode
, which describes the specific compilation steps for
individual units, UserIntent
represents the overall goal of the build
process as specified by the user.
For example, when a user runs cargo test
, the intent is UserIntent::Test
,
but this might result in multiple CompileMode
s for different units.
Variants§
Bench
Build benchmark binaries, e.g., cargo bench
Build
Build binaries and libraries, e.g., cargo run
, cargo install
, cargo build
.
Check
Perform type-check, e.g., cargo check
.
Doc
Document packages.
If deps
is true, then it will also document all dependencies.
if json
is true, the documentation output is in json format.
Doctest
Build doctest binaries, e.g., cargo test --doc
Test
Build test binaries, e.g., cargo test
Implementations§
Source§impl UserIntent
impl UserIntent
Sourcepub fn wants_doc_json_output(self) -> bool
pub fn wants_doc_json_output(self) -> bool
User wants rustdoc output in JSON format.
Sourcepub fn wants_deps_docs(self) -> bool
pub fn wants_deps_docs(self) -> bool
User wants to document also for dependencies.
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.
Trait Implementations§
Source§impl Clone for UserIntent
impl Clone for UserIntent
Source§fn clone(&self) -> UserIntent
fn clone(&self) -> UserIntent
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for UserIntent
impl Debug for UserIntent
impl Copy for UserIntent
Auto Trait Implementations§
impl Freeze for UserIntent
impl RefUnwindSafe for UserIntent
impl Send for UserIntent
impl Sync for UserIntent
impl Unpin for UserIntent
impl UnwindSafe for UserIntent
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<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
§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: 2 bytes
Size for each variant:
Bench
: 0 bytesBuild
: 0 bytesCheck
: 2 bytesDoc
: 2 bytesDoctest
: 0 bytesTest
: 0 bytes