[−][src]Struct platforms::platform::Platform
Rust platforms supported by mainline rustc
Sourced from https://doc.rust-lang.org/nightly/rustc/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 workTier::Two
: guaranteed to buildTier::Three
: unofficially supported with no guarantees
Implementations
impl Platform
[src]
pub fn find(target_triple: &str) -> Option<&'static Platform>
[src]
Find a Rust platform by its "target triple", e.g. i686-apple-darwin
pub fn guess_current() -> Option<&'static Platform>
[src]
Attempt to guess the current Platform
. May give inaccurate results.
pub const fn all() -> &'static [Platform]
[src]
All valid Rust platforms usable from the mainline compiler
Trait Implementations
impl Clone for Platform
[src]
impl Debug for Platform
[src]
impl Display for Platform
[src]
impl Eq for Platform
[src]
impl Hash for Platform
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Ord for Platform
[src]
fn cmp(&self, other: &Platform) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<Platform> for Platform
[src]
impl PartialOrd<Platform> for Platform
[src]
fn partial_cmp(&self, other: &Platform) -> Option<Ordering>
[src]
fn lt(&self, other: &Platform) -> bool
[src]
fn le(&self, other: &Platform) -> bool
[src]
fn gt(&self, other: &Platform) -> bool
[src]
fn ge(&self, other: &Platform) -> bool
[src]
impl StructuralEq for Platform
[src]
impl StructuralPartialEq for Platform
[src]
Auto Trait Implementations
impl RefUnwindSafe for Platform
impl Send for Platform
impl Sync for Platform
impl Unpin for Platform
impl UnwindSafe for Platform
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,