Enum target_tuples::Environment
source · [−]#[repr(u32)]
pub enum Environment {
Show 23 variants
Unknown,
GNU,
GNUABIN32,
GNUABI64,
GNUEABI,
GNUEABIHF,
GNUX32,
CODE16,
EABI,
EABIHF,
Android,
Musl,
MuslEABI,
MuslEABIHF,
MSVC,
Itanium,
Cygnus,
CoreCLR,
Simulator,
MacABI,
PhantomStandard,
PhantomKernel,
Null,
// some variants omitted
}
Expand description
The Environment field of target tuples
Variants
Unknown
GNU
GNUABIN32
GNUABI64
GNUEABI
GNUEABIHF
GNUX32
CODE16
EABI
EABIHF
Android
Musl
MuslEABI
MuslEABIHF
MSVC
Itanium
Cygnus
CoreCLR
Simulator
MacABI
PhantomStandard
PhantomKernel
Null
Implementations
sourceimpl Environment
impl Environment
sourcepub fn parse(s: &str) -> Self
pub fn parse(s: &str) -> Self
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
sourceimpl Clone for Environment
impl Clone for Environment
sourcefn clone(&self) -> Environment
fn clone(&self) -> Environment
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for Environment
impl Debug for Environment
sourceimpl Display for Environment
impl Display for Environment
sourceimpl FromStr for Environment
impl FromStr for Environment
sourceimpl Hash for Environment
impl Hash for Environment
sourceimpl PartialEq<Environment> for Environment
impl PartialEq<Environment> for Environment
impl Copy for Environment
impl Eq for Environment
impl StructuralEq for Environment
impl StructuralPartialEq for Environment
Auto Trait Implementations
impl RefUnwindSafe for Environment
impl Send for Environment
impl Sync for Environment
impl Unpin for Environment
impl UnwindSafe for Environment
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