[][src]Enum platforms::target::OS

pub enum OS {
    Android,
    Bitrig,
    CloudABI,
    Dragonfly,
    Emscripten,
    FreeBSD,
    Fuchsia,
    Haiku,
    iOS,
    Linux,
    MacOS,
    NetBSD,
    OpenBSD,
    Redox,
    Solaris,
    Windows,
    Unknown,
}

target_os: Operating system of the target. This value is closely related to the second and third element of the platform target triple, though it is not identical.

Variants

Android

android: Google's Android mobile operating system

Bitrig

bitrig: OpenBSD-based operating system

CloudABI

cloudabi: Nuxi CloudABI runtime environment

Dragonfly

dragonfly: DragonflyBSD

Emscripten

emscripten: The emscripten JavaScript transpiler

FreeBSD

freebsd: The FreeBSD operating system

Fuchsia

fuchsia: Google's next-gen Rust OS

Haiku

haiku: Haiku, an open source BeOS clone

iOS

ios: Apple's iOS mobile operating system

Linux

linux: Linux

MacOS

macos: Apple's Mac OS X

NetBSD

netbsd: The NetBSD operating system

OpenBSD

openbsd: The OpenBSD operating system

Redox

redox: Redox, a Unix-like OS written in Rust

Solaris

solaris: Oracle's (formerly Sun) Solaris operating system

Windows

windows: Microsoft's Windows operating system

Unknown

Operating systems we don't know about

Methods

impl OS
[src]

pub fn as_str(self) -> &'static str
[src]

String representing this target OS which matches #[cfg(target_os)]

Trait Implementations

impl Copy for OS
[src]

impl Debug for OS
[src]

impl PartialEq<OS> for OS
[src]

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests for !=.

impl Eq for OS
[src]

impl Ord for OS
[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<OS> for OS
[src]

#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0
[src]

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

#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0
[src]

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

#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0
[src]

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

#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0
[src]

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

impl FromStr for OS
[src]

type Err = Error

The associated error which can be returned from parsing.

fn from_str(os_name: &str) -> Result<Self, Self::Err>
[src]

Create a new Env from the given string

impl Hash for OS
[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

impl Clone for OS
[src]

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

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl Send for OS

impl Sync for OS

Blanket Implementations

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> From for T
[src]

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