[−][src]Enum target_tuples::Vendor
The Vendor field of a target tuple
Variants
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.
pub fn from_str(s: &str) -> Result<Self, Self::Err>
[src]
impl PartialEq<Vendor> for Vendor
[src]
pub fn eq(&self, other: &Vendor) -> bool
[src]
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl StructuralEq for Vendor
[src]
impl StructuralPartialEq for Vendor
[src]
Auto Trait Implementations
impl RefUnwindSafe for Vendor
[src]
impl Send for Vendor
[src]
impl Sync for Vendor
[src]
impl Unpin for Vendor
[src]
impl UnwindSafe for Vendor
[src]
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>,