Enum target_tuples::ObjectFormat [−][src]
#[non_exhaustive]
pub enum ObjectFormat {
Unknown,
XCoff,
Coff,
Elf,
Goff,
MachO,
Wasm,
Xo65,
O65,
WlaObj,
}Expand description
The object format used by a target
Variants (Non-exhaustive)
This enum is marked as 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
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);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
Auto Trait Implementations
impl RefUnwindSafe for ObjectFormatimpl Send for ObjectFormatimpl Sync for ObjectFormatimpl Unpin for ObjectFormatimpl UnwindSafe for ObjectFormatBlanket Implementations
Mutably borrows from an owned value. Read more