Enum target_tuples::OS
source · [−]#[repr(u32)]
pub enum OS {
Show 41 variants
Unknown,
Ananas,
CloudABI,
Darwin,
DragonFly,
FreeBSD,
Fuchsia,
IOS,
KFreeBSD,
Linux,
Lv2,
MacOSX,
NetBSD,
OpenBSD,
Solaris,
Win32,
ZOS,
Haiku,
Minix,
RTEMS,
NaCl,
AIX,
CUDA,
NVCL,
AMDHSA,
PS4,
ELFIAMCU,
TvOS,
WatchOS,
Mesa3D,
Contiki,
AMDPAL,
HermitCore,
Hurd,
WASI,
Emscripten,
PhantomOS,
SNES,
NES,
None,
Null,
// some variants omitted
}
Expand description
The Operating System Field of a target tuple
Variants
Unknown
Ananas
CloudABI
Darwin
DragonFly
FreeBSD
Fuchsia
IOS
KFreeBSD
Linux
Lv2
MacOSX
NetBSD
OpenBSD
Solaris
Win32
ZOS
Haiku
Minix
RTEMS
NaCl
AIX
CUDA
NVCL
AMDHSA
PS4
ELFIAMCU
TvOS
WatchOS
Mesa3D
Contiki
AMDPAL
HermitCore
Hurd
WASI
Emscripten
PhantomOS
SNES
NES
None
Null
Implementations
sourceimpl OS
impl OS
sourcepub fn parse(s: &str) -> Self
pub fn parse(s: &str) -> Self
Parses the OS in a “lossy” manner
This is equivalent to Self::from_str
, except that OS::Unknown
is returned, instead of an error, on an unknown OS Field
sourcepub fn canonical_name(&self) -> &'static str
pub fn canonical_name(&self) -> &'static str
Returns the canonical name of the operating system
The canonical name, when passed into [
Self::parse`] will yield an equivalent value,
Formatting an OS yields this string
Trait Implementations
impl Copy for OS
impl Eq for OS
impl StructuralEq for OS
impl StructuralPartialEq for OS
Auto Trait Implementations
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more