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

Implementations

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

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

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

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

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

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

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

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Creates a TargetConfiguration from the CARGO_CFG_TARGET_* environment variables

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.