Struct tectonic_cfg_support::TargetConfiguration
source · [−]pub struct TargetConfiguration {
pub arch: String,
pub feature: String,
pub os: String,
pub family: String,
pub env: String,
pub endian: String,
pub pointer_width: String,
pub vendor: String,
}
Expand description
Information about the compilation target.
These parameters are derived from the CARGO_TARGET_CFG_*
environment
variables, which must be used to obtain correct results when
cross-compiling a build.rs
script. The configuration values are
uppercased when they’re loaded, to allow for case-insensitive comparisons
later.
Fields
arch: String
feature: String
os: String
family: String
env: String
endian: String
pointer_width: String
vendor: String
Implementations
sourceimpl TargetConfiguration
impl TargetConfiguration
sourcepub fn target_arch(&self, arch: &str) -> bool
pub fn target_arch(&self, arch: &str) -> bool
Test whether the target architecture exactly matches the argument, in case-insensitive fashion.
sourcepub fn target_os(&self, os: &str) -> bool
pub fn target_os(&self, os: &str) -> bool
Test whether the target OS exactly matches the argument, in case-insensitive fashion.
sourcepub fn target_family(&self, family: &str) -> bool
pub fn target_family(&self, family: &str) -> bool
Test whether the target family exactly matches the argument, in case-insensitive fashion.
sourcepub fn target_env(&self, env: &str) -> bool
pub fn target_env(&self, env: &str) -> bool
Test whether the target “environment” exactly matches the argument, in case-insensitive fashion.
sourcepub fn target_endian(&self, endian: &str) -> bool
pub fn target_endian(&self, endian: &str) -> bool
Test whether the target endianness exactly matches the argument, in case-insensitive fashion.
sourcepub fn target_pointer_width(&self, pointer_width: &str) -> bool
pub fn target_pointer_width(&self, pointer_width: &str) -> bool
Test whether the target pointer width exactly matches the argument, in case-insensitive fashion.
sourcepub fn target_vendor(&self, vendor: &str) -> bool
pub fn target_vendor(&self, vendor: &str) -> bool
Test whether the target vendor exactly matches the argument, in case-insensitive fashion.
Trait Implementations
sourceimpl Clone for TargetConfiguration
impl Clone for TargetConfiguration
sourcefn clone(&self) -> TargetConfiguration
fn clone(&self) -> TargetConfiguration
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for TargetConfiguration
impl Debug for TargetConfiguration
sourceimpl Default for TargetConfiguration
impl Default for TargetConfiguration
sourcefn default() -> Self
fn default() -> Self
Creates a TargetConfiguration from the CARGO_CFG_TARGET_*
environment variables
Auto Trait Implementations
impl RefUnwindSafe for TargetConfiguration
impl Send for TargetConfiguration
impl Sync for TargetConfiguration
impl Unpin for TargetConfiguration
impl UnwindSafe for TargetConfiguration
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
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more