pub struct RustcTargetData<'cfg> {
pub rustc: Rustc,
/* private fields */
}
Expand description
Collection of information about rustc
and the host and target.
Fields
rustc: Rustc
Information about rustc
itself.
Implementations
sourceimpl<'cfg> RustcTargetData<'cfg>
impl<'cfg> RustcTargetData<'cfg>
pub fn new(
ws: &Workspace<'cfg>,
requested_kinds: &[CompileKind]
) -> CargoResult<RustcTargetData<'cfg>>
sourcepub fn short_name<'a>(&'a self, kind: &'a CompileKind) -> &'a str
pub fn short_name<'a>(&'a self, kind: &'a CompileKind) -> &'a str
Returns a “short” name for the given kind, suitable for keying off configuration in Cargo or presenting to users.
sourcepub fn dep_platform_activated(
&self,
dep: &Dependency,
kind: CompileKind
) -> bool
pub fn dep_platform_activated(
&self,
dep: &Dependency,
kind: CompileKind
) -> bool
Whether a dependency should be compiled for the host or target platform,
specified by CompileKind
.
sourcepub fn cfg(&self, kind: CompileKind) -> &[Cfg]
pub fn cfg(&self, kind: CompileKind) -> &[Cfg]
Gets the list of cfg
s printed out from the compiler for the specified kind.
sourcepub fn info(&self, kind: CompileKind) -> &TargetInfo
pub fn info(&self, kind: CompileKind) -> &TargetInfo
Information about the given target platform, learned by querying rustc.
sourcepub fn target_config(&self, kind: CompileKind) -> &TargetConfig
pub fn target_config(&self, kind: CompileKind) -> &TargetConfig
Gets the target configuration for a particular host or target.
sourcepub fn script_override(
&self,
lib_name: &str,
kind: CompileKind
) -> Option<&BuildOutput>
pub fn script_override(
&self,
lib_name: &str,
kind: CompileKind
) -> Option<&BuildOutput>
If a build script is overridden, this returns the BuildOutput
to use.
lib_name
is the links
library name and kind
is whether it is for
Host or Target.
Auto Trait Implementations
impl<'cfg> !RefUnwindSafe for RustcTargetData<'cfg>
impl<'cfg> !Send for RustcTargetData<'cfg>
impl<'cfg> !Sync for RustcTargetData<'cfg>
impl<'cfg> Unpin for RustcTargetData<'cfg>
impl<'cfg> !UnwindSafe for RustcTargetData<'cfg>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more