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

pub struct Platform {
    pub target_triple: &'static str,
    pub target_arch: Arch,
    pub target_os: OS,
    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: &'static str

"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_arch: Arch

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

target_os: OS

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

target_env: Option<Env>

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: Tier

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]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for Platform
[src]

impl PartialEq<Platform> for Platform
[src]

impl Eq for Platform
[src]

impl Ord for Platform
[src]

fn max(self, other: Self) -> Self
1.21.0
[src]

Compares and returns the maximum of two values. Read more

fn min(self, other: Self) -> Self
1.21.0
[src]

Compares and returns the minimum of two values. Read more

impl PartialOrd<Platform> for Platform
[src]

impl Hash for Platform
[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0
[src]

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

Auto Trait Implementations

impl Send for Platform

impl Sync for Platform

Blanket Implementations

impl<T> From for T
[src]

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

type Error = !

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

The type returned in the event of a conversion error.

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

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

The type returned in the event of a conversion error.

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T