Enum target_tuples::ObjectFormat
source · #[repr(u32)]pub enum ObjectFormat {
Unknown = 0,
XCoff = 1,
Coff = 2,
Elf = 3,
Goff = 4,
MachO = 5,
Wasm = 6,
Xo65 = 7,
O65 = 8,
WlaObj = 9,
Null = 4_294_967_295,
// some variants omitted
}
Expand description
The object format used by a target
Variants§
Unknown = 0
XCoff = 1
Coff = 2
Elf = 3
Goff = 4
MachO = 5
Wasm = 6
Xo65 = 7
O65 = 8
WlaObj = 9
Null = 4_294_967_295
Implementations§
source§impl ObjectFormat
impl ObjectFormat
sourcepub fn parse(s: &str) -> Self
pub fn parse(s: &str) -> Self
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
sourcepub fn canonical_name(&self) -> &'static str
pub fn canonical_name(&self) -> &'static str
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
Trait Implementations§
source§impl Clone for ObjectFormat
impl Clone for ObjectFormat
source§fn clone(&self) -> ObjectFormat
fn clone(&self) -> ObjectFormat
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ObjectFormat
impl Debug for ObjectFormat
source§impl Display for ObjectFormat
impl Display for ObjectFormat
source§impl FromStr for ObjectFormat
impl FromStr for ObjectFormat
source§impl Hash for ObjectFormat
impl Hash for ObjectFormat
source§impl PartialEq for ObjectFormat
impl PartialEq for ObjectFormat
source§fn eq(&self, other: &ObjectFormat) -> bool
fn eq(&self, other: &ObjectFormat) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for ObjectFormat
impl Eq for ObjectFormat
impl StructuralEq for ObjectFormat
impl StructuralPartialEq for ObjectFormat
Auto Trait Implementations§
impl RefUnwindSafe for ObjectFormat
impl Send for ObjectFormat
impl Sync for ObjectFormat
impl Unpin for ObjectFormat
impl UnwindSafe for ObjectFormat
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more