pub enum Environment {
Show 22 variants
Unknown = 0,
GNU = 1,
GNUABIN32 = 2,
GNUABI64 = 3,
GNUEABI = 4,
GNUEABIHF = 5,
GNUX32 = 6,
CODE16 = 7,
EABI = 8,
EABIHF = 9,
Android = 10,
Musl = 11,
MuslEABI = 12,
MuslEABIHF = 13,
MSVC = 15,
Itanium = 16,
Cygnus = 17,
CoreCLR = 18,
Simulator = 19,
MacABI = 20,
Standard = 23,
Kernel = 24,
}Expand description
The Environment field of target tuples
Variants§
Unknown = 0
GNU = 1
GNUABIN32 = 2
GNUABI64 = 3
GNUEABI = 4
GNUEABIHF = 5
GNUX32 = 6
CODE16 = 7
EABI = 8
EABIHF = 9
Android = 10
Musl = 11
MuslEABI = 12
MuslEABIHF = 13
MSVC = 15
Itanium = 16
Cygnus = 17
CoreCLR = 18
Simulator = 19
MacABI = 20
Standard = 23
Kernel = 24
Implementations§
Source§impl Environment
impl Environment
Sourcepub fn parse(s: &str) -> Environment
pub fn parse(s: &str) -> Environment
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
Sourcepub fn canonical_name(&self) -> &'static str
pub fn canonical_name(&self) -> &'static str
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
Trait Implementations§
Source§impl Clone for Environment
impl Clone for Environment
Source§fn clone(&self) -> Environment
fn clone(&self) -> Environment
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Environment
impl Debug for Environment
Source§impl Display for Environment
impl Display for Environment
Source§impl FromStr for Environment
impl FromStr for Environment
Source§type Err = UnknownError
type Err = UnknownError
The associated error which can be returned from parsing.
Source§fn from_str(s: &str) -> Result<Environment, <Environment as FromStr>::Err>
fn from_str(s: &str) -> Result<Environment, <Environment as FromStr>::Err>
Parses a string
s to return a value of this type. Read moreSource§impl Hash for Environment
impl Hash for Environment
Source§impl PartialEq for Environment
impl PartialEq for Environment
impl Copy for Environment
impl Eq for Environment
impl StructuralPartialEq for Environment
Auto Trait Implementations§
impl Freeze for Environment
impl RefUnwindSafe for Environment
impl Send for Environment
impl Sync for Environment
impl Unpin for Environment
impl UnwindSafe for Environment
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