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

#[non_exhaustive]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 (Non-exhaustive)

Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future 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

Implementations

impl OS[src]

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

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

Trait Implementations

impl Clone for OS[src]

impl Copy for OS[src]

impl Debug for OS[src]

impl Display for OS[src]

impl Eq for OS[src]

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]

impl Ord for OS[src]

impl PartialEq<OS> for OS[src]

impl PartialOrd<OS> for OS[src]

impl StructuralEq for OS[src]

impl StructuralPartialEq for OS[src]

Auto Trait Implementations

impl RefUnwindSafe for OS

impl Send for OS

impl Sync for OS

impl Unpin for OS

impl UnwindSafe for OS

Blanket Implementations

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

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

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

impl<T> From<T> for T[src]

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

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

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.