[−][src]Enum target_tuples::ObjectFormat
The object format used by a target
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 ObjectFormat[src]
pub fn parse(s: &str) -> Self[src]
Parses the ObjectFormat name in a "lossy" manner, from the end of the Environment field
This is equivalent to Self::from_str, except that ObjectFormat::Unknown is returned, instead of an error, on an unknown OS Field
Example
use target_tuples::ObjectFormat;
let of = ObjectFormat::parse("gnuelf");
assert_eq!(of,ObjectFormat::Elf);
let of2: ObjectFormat = "pstdelf".parse().unwrap();
assert_eq!(of,of2);pub fn canonical_name(&self) -> &'static str[src]
Returns the canonical name of the object format
The canonical name, when passed into Self::parse will yield an equivalent value,
Formatting an ObjectFormat yields this string
Examples
use target_tuples::ObjectFormat; let os = ObjectFormat::MachO; assert_eq!(ObjectFormat::parse(os.canonical_name()),os);
Trait Implementations
impl Clone for ObjectFormat[src]
pub fn clone(&self) -> ObjectFormat[src]
pub fn clone_from(&mut self, source: &Self)1.0.0[src]
impl Copy for ObjectFormat[src]
impl Debug for ObjectFormat[src]
impl Display for ObjectFormat[src]
impl Eq for ObjectFormat[src]
impl FromStr for ObjectFormat[src]
type Err = UnknownError
The associated error which can be returned from parsing.
pub fn from_str(s: &str) -> Result<Self, Self::Err>[src]
impl PartialEq<ObjectFormat> for ObjectFormat[src]
pub fn eq(&self, other: &ObjectFormat) -> bool[src]
#[must_use]pub fn ne(&self, other: &Rhs) -> bool1.0.0[src]
impl StructuralEq for ObjectFormat[src]
impl StructuralPartialEq for ObjectFormat[src]
Auto Trait Implementations
impl RefUnwindSafe for ObjectFormat[src]
impl Send for ObjectFormat[src]
impl Sync for ObjectFormat[src]
impl Unpin for ObjectFormat[src]
impl UnwindSafe for ObjectFormat[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>,