[][src]Enum target_tuples::Vendor

pub enum Vendor {
    Unknown,
    Apple,
    PC,
    SNES,
    SCEI,
    Freescale,
    IBM,
    ImaginationTechnologies,
    MipsTechnologies,
    NVIDIA,
    CSR,
    Myriad,
    AMD,
    Mesa,
    SUSE,
    OpenEmbedded,
}

The Vendor field of a target tuple

Variants

Unknown
Apple
PC
SNES
SCEI
Freescale
IBM
ImaginationTechnologies
MipsTechnologies
NVIDIA
CSR
Myriad
AMD
Mesa
SUSE
OpenEmbedded

Implementations

impl Vendor[src]

pub fn parse(s: &str) -> Self[src]

Parses the Vendor in a "lossy" manner This is equivalent to Self::from_str. Note that an unknown vendor is not considered an error.

Example

    use target_tuples::Vendor;
    let vendor = Vendor::parse("pc");
    assert_eq!(vendor,Vendor::PC);
    let vendor2: Vendor = "pc".parse().unwrap();
    assert_eq!(vendor,vendor2);

pub fn canonical_name(&self) -> &'static str[src]

Returns the canonical name of the vendor The canonical name, when passed into [Self::parse`] will yield an equivalent value, Formatting a Vendor yields this string

Examples

   use target_tuples::Vendor;
   let vendor = Vendor::Apple;
   assert_eq!(Vendor::parse(vendor.canonical_name()),vendor);

Trait Implementations

impl Clone for Vendor[src]

impl Copy for Vendor[src]

impl Debug for Vendor[src]

impl Display for Vendor[src]

impl Eq for Vendor[src]

impl FromStr for Vendor[src]

type Err = Infallible

The associated error which can be returned from parsing.

impl PartialEq<Vendor> for Vendor[src]

impl StructuralEq for Vendor[src]

impl StructuralPartialEq for Vendor[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.