[][src]Struct tectonic_cfg_support::TargetConfiguration

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,
}

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: Stringfeature: Stringos: Stringfamily: Stringenv: Stringendian: Stringpointer_width: Stringvendor: String

Implementations

impl TargetConfiguration[src]

pub fn target_arch(&self, arch: &str) -> bool[src]

Test whether the target architecture exactly matches the argument, in case-insensitive fashion.

pub fn target_os(&self, os: &str) -> bool[src]

Test whether the target OS exactly matches the argument, in case-insensitive fashion.

pub fn target_family(&self, family: &str) -> bool[src]

Test whether the target family exactly matches the argument, in case-insensitive fashion.

pub fn target_env(&self, env: &str) -> bool[src]

Test whether the target "environment" exactly matches the argument, in case-insensitive fashion.

pub fn target_endian(&self, endian: &str) -> bool[src]

Test whether the target endianness exactly matches the argument, in case-insensitive fashion.

pub fn target_pointer_width(&self, pointer_width: &str) -> bool[src]

Test whether the target pointer width exactly matches the argument, in case-insensitive fashion.

pub fn target_vendor(&self, vendor: &str) -> bool[src]

Test whether the target vendor exactly matches the argument, in case-insensitive fashion.

Trait Implementations

impl Clone for TargetConfiguration[src]

impl Debug for TargetConfiguration[src]

impl Default for TargetConfiguration[src]

fn default() -> Self[src]

Creates a TargetConfiguration from the CARGO_CFG_TARGET_* environment variables

Auto Trait Implementations

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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.