Struct cargo::core::compiler::BuildConfig[][src]

pub struct BuildConfig {
    pub requested_kind: CompileKind,
    pub jobs: u32,
    pub profile_kind: ProfileKind,
    pub mode: CompileMode,
    pub message_format: MessageFormat,
    pub force_rebuild: bool,
    pub build_plan: bool,
    pub primary_unit_rustc: Option<ProcessBuilder>,
    pub rustfix_diagnostic_server: RefCell<Option<RustfixDiagnosticServer>>,
}

Configuration information for a rustc build.

Fields

requested_kind: CompileKind

The requested kind of compilation for this session

jobs: u32

Number of rustc jobs to run in parallel.

profile_kind: ProfileKind

Build profile

mode: CompileMode

The mode we are compiling in.

message_format: MessageFormat

true to print stdout in JSON format (for machine reading).

force_rebuild: bool

Force Cargo to do a full rebuild and treat each target as changed.

build_plan: bool

Output a build plan to stdout instead of actually compiling.

primary_unit_rustc: Option<ProcessBuilder>

An optional override of the rustc path for primary units only

rustfix_diagnostic_server: RefCell<Option<RustfixDiagnosticServer>>

Implementations

impl BuildConfig[src]

pub fn new(
    config: &Config,
    jobs: Option<u32>,
    requested_target: &Option<String>,
    mode: CompileMode
) -> CargoResult<BuildConfig>
[src]

Parses all config files to learn about build configuration. Currently configured options are:

  • build.jobs
  • build.target
  • target.$target.ar
  • target.$target.linker
  • target.$target.libfoo.metadata

pub fn emit_json(&self) -> bool[src]

Whether or not the user wants JSON output. Whether or not rustc actually uses JSON is decided in add_error_format.

pub fn profile_name(&self) -> &str[src]

pub fn test(&self) -> bool[src]

Trait Implementations

impl Debug for BuildConfig[src]

Auto Trait Implementations

impl !RefUnwindSafe for BuildConfig

impl Send for BuildConfig

impl !Sync for BuildConfig

impl Unpin for BuildConfig

impl UnwindSafe for BuildConfig

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T[src]

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 
[src]