Enum target_tuples::Environment [−][src]
#[non_exhaustive]
pub enum Environment {
Show variants
Unknown,
GNU,
GNUABIN32,
GNUABI64,
GNUEABI,
GNUEABIHF,
GNUX32,
CODE16,
EABI,
EABIHF,
Android,
Musl,
MuslEABI,
MuslEABIHF,
MSVC,
Itanium,
Cygnus,
CoreCLR,
Simulator,
MacABI,
PhantomStandard,
PhantomKernel,
}Expand description
The Environment field of target tuples
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 Environment name in a “lossy” manner
This is equivalent to Self::from_str, except that Environment::Unknown is returned, instead of an error, on an unknown OS Field
Example
use target_tuples::Environment;
let env = Environment::parse("gnu");
assert_eq!(env,Environment::GNU);
let env2: Environment = "gnu".parse().unwrap();
assert_eq!(env,env2);Returns the canonical name of the environment
The canonical name, when passed into Self::parse will yield an equivalent value,
Formatting an Environment yields this string
Examples
use target_tuples::Environment; let os = Environment::Musl; assert_eq!(Environment::parse(os.canonical_name()),os);
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Environmentimpl Send for Environmentimpl Sync for Environmentimpl Unpin for Environmentimpl UnwindSafe for EnvironmentBlanket Implementations
Mutably borrows from an owned value. Read more