pub struct CompileOptions {
pub build_config: BuildConfig,
pub cli_features: CliFeatures,
pub spec: Packages,
pub filter: CompileFilter,
pub target_rustdoc_args: Option<Vec<String>>,
pub target_rustc_args: Option<Vec<String>>,
pub target_rustc_crate_types: Option<Vec<String>>,
pub rustdoc_document_private_items: bool,
pub honor_rust_version: Option<bool>,
}Expand description
Contains information about how a package should be compiled.
Note on distinction between CompileOptions and BuildConfig:
BuildConfig contains values that need to be retained after
BuildContext is created. The other fields are no longer necessary. Think
of it as CompileOptions are high-level settings requested on the
command-line, and BuildConfig are low-level settings for actually
driving rustc.
Fields§
§build_config: BuildConfigConfiguration information for a rustc build
cli_features: CliFeaturesFeature flags requested by the user.
spec: PackagesA set of packages to build.
filter: CompileFilterFilter to apply to the root package to select which targets will be built.
target_rustdoc_args: Option<Vec<String>>Extra arguments to be passed to rustdoc (single target only)
target_rustc_args: Option<Vec<String>>The specified target will be compiled with all the available arguments, note that this only accounts for the final invocation of rustc
target_rustc_crate_types: Option<Vec<String>>Crate types to be passed to rustc (single target only)
rustdoc_document_private_items: boolWhether the --document-private-items flags was specified and should
be forwarded to rustdoc.
honor_rust_version: Option<bool>Whether the build process should check the minimum Rust version defined in the cargo metadata for a crate.
Implementations§
Source§impl CompileOptions
impl CompileOptions
pub fn new( gctx: &GlobalContext, intent: UserIntent, ) -> CargoResult<CompileOptions>
Trait Implementations§
Source§impl Clone for CompileOptions
impl Clone for CompileOptions
Source§fn clone(&self) -> CompileOptions
fn clone(&self) -> CompileOptions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for CompileOptions
impl !RefUnwindSafe for CompileOptions
impl !Send for CompileOptions
impl !Sync for CompileOptions
impl Unpin for CompileOptions
impl !UnwindSafe for CompileOptions
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: 536 bytes