pub struct Cargo {
command: BootstrapCommand,
compiler: Compiler,
target: TargetSelection,
rustflags: Rustflags,
rustdocflags: Rustflags,
hostflags: HostFlags,
allow_features: String,
}
Fields§
§command: BootstrapCommand
§compiler: Compiler
§target: TargetSelection
§rustflags: Rustflags
§rustdocflags: Rustflags
§hostflags: HostFlags
§allow_features: String
Implementations§
source§impl Cargo
impl Cargo
sourcepub fn new(
builder: &Builder<'_>,
compiler: Compiler,
mode: Mode,
source_type: SourceType,
target: TargetSelection,
cmd_kind: Kind,
) -> Cargo
pub fn new( builder: &Builder<'_>, compiler: Compiler, mode: Mode, source_type: SourceType, target: TargetSelection, cmd_kind: Kind, ) -> Cargo
Calls Builder::cargo
and Cargo::configure_linker
to prepare an invocation of cargo
to be run.
pub fn into_cmd(self) -> BootstrapCommand
sourcepub fn new_for_mir_opt_tests(
builder: &Builder<'_>,
compiler: Compiler,
mode: Mode,
source_type: SourceType,
target: TargetSelection,
cmd_kind: Kind,
) -> Cargo
pub fn new_for_mir_opt_tests( builder: &Builder<'_>, compiler: Compiler, mode: Mode, source_type: SourceType, target: TargetSelection, cmd_kind: Kind, ) -> Cargo
Same as Cargo::new
except this one doesn’t configure the linker with Cargo::configure_linker
pub fn rustdocflag(&mut self, arg: &str) -> &mut Cargo
pub fn rustflag(&mut self, arg: &str) -> &mut Cargo
pub fn arg(&mut self, arg: impl AsRef<OsStr>) -> &mut Cargo
pub fn args<I, S>(&mut self, args: I) -> &mut Cargo
pub fn env( &mut self, key: impl AsRef<OsStr>, value: impl AsRef<OsStr>, ) -> &mut Cargo
pub fn add_rustc_lib_path(&mut self, builder: &Builder<'_>)
pub fn current_dir(&mut self, dir: &Path) -> &mut Cargo
sourcepub fn allow_features(&mut self, features: &str) -> &mut Cargo
pub fn allow_features(&mut self, features: &str) -> &mut Cargo
Adds nightly-only features that this invocation is allowed to use.
By default, all nightly features are allowed. Once this is called, it will be restricted to the given set.
fn configure_linker(&mut self, builder: &Builder<'_>) -> &mut Cargo
Trait Implementations§
source§impl From<Cargo> for BootstrapCommand
impl From<Cargo> for BootstrapCommand
source§fn from(cargo: Cargo) -> BootstrapCommand
fn from(cargo: Cargo) -> BootstrapCommand
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for Cargo
impl !RefUnwindSafe for Cargo
impl Send for Cargo
impl Sync for Cargo
impl Unpin for Cargo
impl !UnwindSafe for Cargo
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
Mutably borrows from an owned value. Read more
§impl<T> Pointable for T
impl<T> Pointable for T
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: 504 bytes