pub struct RustcTargetData {
pub rustc: Rustc,
/* private fields */
}Expand description
Collection of information about rustc and the host and target.
Fields§
§rustc: RustcInformation about rustc itself.
Implementations§
Source§impl RustcTargetData
impl RustcTargetData
pub fn new( ws: &Workspace<'_>, requested_kind: CompileKind, ) -> CargoResult<RustcTargetData>
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 cfgs 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.
Auto Trait Implementations§
impl !Freeze for RustcTargetData
impl !RefUnwindSafe for RustcTargetData
impl Send for RustcTargetData
impl !Sync for RustcTargetData
impl Unpin for RustcTargetData
impl UnsafeUnpin for RustcTargetData
impl UnwindSafe for RustcTargetData
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