Enum target_tuples::OS [−][src]
#[non_exhaustive] pub enum OS {}Show 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,
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.
Implementations
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
Example
use target_tuples::OS; let os = OS::parse("linux"); assert_eq!(os,OS::Linux); let os2: OS = "linux".parse().unwrap(); assert_eq!(os,os2);
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
Examples
use target_tuples::OS; let os = OS::PS4; assert_eq!(OS::parse(os.canonical_name()),os);
Trait Implementations
Auto Trait Implementations
Blanket Implementations
Mutably borrows from an owned value. Read more