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: &'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_os: OS
Target OS cfg
attribute (i.e. cfg(target_os)
).
target_arch: Arch
Target architecture cfg
attribute (i.e. cfg(target_arch)
)
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 workTier::Two
: guaranteed to buildTier::Three
: unofficially supported with no guarantees
Trait Implementations
impl Clone for Platform
[src]
impl Clone for Platform
fn clone(&self) -> Platform
[src]
fn clone(&self) -> Platform
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Debug for Platform
[src]
impl Debug for Platform
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Eq for Platform
[src]
impl Eq for Platform
impl Hash for Platform
[src]
impl Hash for Platform
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl PartialEq for Platform
[src]
impl PartialEq for Platform
fn eq(&self, other: &Platform) -> bool
[src]
fn eq(&self, other: &Platform) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Platform) -> bool
[src]
fn ne(&self, other: &Platform) -> bool
This method tests for !=
.
impl PartialOrd for Platform
[src]
impl PartialOrd for Platform
fn partial_cmp(&self, other: &Platform) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &Platform) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &Platform) -> bool
[src]
fn lt(&self, other: &Platform) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &Platform) -> bool
[src]
fn le(&self, other: &Platform) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, other: &Platform) -> bool
[src]
fn gt(&self, other: &Platform) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &Platform) -> bool
[src]
fn ge(&self, other: &Platform) -> bool
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]
impl Ord for Platform
fn cmp(&self, other: &Platform) -> Ordering
[src]
fn cmp(&self, other: &Platform) -> Ordering
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.21.0[src]
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more