Enum target_tuples::Environment [−][src]
The Environment field of target tuples
Variants (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
impl Environment[src]
pub fn parse(s: &str) -> Self[src]
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);pub fn canonical_name(&self) -> &'static str[src]
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
impl Clone for Environment[src]
fn clone(&self) -> Environment[src]
pub fn clone_from(&mut self, source: &Self)1.0.0[src]
impl Copy for Environment[src]
impl Debug for Environment[src]
impl Display for Environment[src]
impl Eq for Environment[src]
impl FromStr for Environment[src]
type Err = UnknownError
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<Self, Self::Err>[src]
impl PartialEq<Environment> for Environment[src]
fn eq(&self, other: &Environment) -> bool[src]
#[must_use]pub fn ne(&self, other: &Rhs) -> bool1.0.0[src]
impl StructuralEq for Environment[src]
impl StructuralPartialEq for Environment[src]
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
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[src]
impl<T> ToString for T where
T: Display + ?Sized, [src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,