Struct platforms::platform::Platform[][src]

pub struct Platform {
    pub target_triple: &'static str,
    pub target_os: OS,
    pub target_arch: Arch,
    pub target_env: Option<Env>,
    pub tier: Tier,
}

Rust platforms supported by mainline rustc

Sourced from https://forge.rust-lang.org/platform-support.html

Fields

"Target triple" string uniquely identifying the platform. See: https://github.com/rust-lang/rfcs/blob/master/text/0131-target-specification.md

These are defined in the rustc_target crate of the Rust compiler: https://github.com/rust-lang/rust/blob/master/src/librustc_target/spec/mod.rs

Target OS cfg attribute (i.e. cfg(target_os)).

Target architecture cfg attribute (i.e. cfg(target_arch))

Target environment cfg attribute (i.e. cfg(target_env)). Only used when needed for disambiguation, e.g. on many GNU platforms this value will be None.

Tier of this platform:

  • Tier::One: guaranteed to work
  • Tier::Two: guaranteed to build
  • Tier::Three: unofficially supported with no guarantees

Trait Implementations

impl Clone for Platform
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for Platform
[src]

Formats the value using the given formatter. Read more

impl Eq for Platform
[src]

impl Hash for Platform
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

impl PartialEq for Platform
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl PartialOrd for Platform
[src]

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl Ord for Platform
[src]

This method returns an Ordering between self and other. Read more

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

Auto Trait Implementations

impl Send for Platform

impl Sync for Platform