Enum target_tuples::ObjectFormat
source · [−]#[repr(u32)]
pub enum ObjectFormat {
Unknown,
XCoff,
Coff,
Elf,
Goff,
MachO,
Wasm,
Xo65,
O65,
WlaObj,
Null,
// some variants omitted
}
Expand description
The object format used by a target
Variants
Unknown
XCoff
Coff
Elf
Goff
MachO
Wasm
Xo65
O65
WlaObj
Null
Implementations
sourceimpl 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
sourceimpl Clone for ObjectFormat
impl Clone for ObjectFormat
sourcefn clone(&self) -> ObjectFormat
fn clone(&self) -> ObjectFormat
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for ObjectFormat
impl Debug for ObjectFormat
sourceimpl Display for ObjectFormat
impl Display for ObjectFormat
sourceimpl FromStr for ObjectFormat
impl FromStr for ObjectFormat
sourceimpl Hash for ObjectFormat
impl Hash for ObjectFormat
sourceimpl PartialEq<ObjectFormat> for ObjectFormat
impl PartialEq<ObjectFormat> for ObjectFormat
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more