#[non_exhaustive]pub enum OS {
Show 42 variants
Unknown = 0,
Ananas = 1,
CloudABI = 2,
Darwin = 3,
DragonFly = 4,
FreeBSD = 5,
Fuchsia = 6,
IOS = 7,
KFreeBSD = 8,
Linux = 9,
Lv2 = 10,
MacOSX = 11,
NetBSD = 12,
OpenBSD = 13,
Solaris = 14,
Win32 = 15,
ZOS = 16,
Haiku = 17,
Minix = 18,
RTEMS = 19,
NaCl = 20,
AIX = 21,
CUDA = 22,
NVCL = 23,
AMDHSA = 24,
PS4 = 25,
ELFIAMCU = 26,
TvOS = 27,
WatchOS = 28,
Mesa3D = 29,
Contiki = 30,
AMDPAL = 31,
HermitCore = 32,
Hurd = 33,
WASI = 34,
Emscripten = 35,
SNES = 37,
NES = 38,
None = 39,
CleverOS = 40,
AbleOS = 41,
Lilium = 42,
}Expand description
The Operating System Field of a target tuple
Variants (Non-exhaustive)§
This enum is marked as 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.
Unknown = 0
Ananas = 1
CloudABI = 2
Darwin = 3
DragonFly = 4
FreeBSD = 5
Fuchsia = 6
IOS = 7
KFreeBSD = 8
Linux = 9
Lv2 = 10
MacOSX = 11
NetBSD = 12
OpenBSD = 13
Solaris = 14
Win32 = 15
ZOS = 16
Haiku = 17
Minix = 18
RTEMS = 19
NaCl = 20
AIX = 21
CUDA = 22
NVCL = 23
AMDHSA = 24
PS4 = 25
ELFIAMCU = 26
TvOS = 27
WatchOS = 28
Mesa3D = 29
Contiki = 30
AMDPAL = 31
HermitCore = 32
Hurd = 33
WASI = 34
Emscripten = 35
SNES = 37
NES = 38
None = 39
CleverOS = 40
AbleOS = 41
Lilium = 42
Implementations§
Source§impl OS
impl OS
Sourcepub fn parse(s: &str) -> OS
pub fn parse(s: &str) -> OS
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 StructuralPartialEq for OS
Auto Trait Implementations§
impl Freeze for OS
impl RefUnwindSafe for OS
impl Send for OS
impl Sync for OS
impl Unpin for OS
impl UnwindSafe for OS
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more