#[repr(u32)]pub enum Architecture {
Show 38 variants
Unknown = 0,
I86 = 1,
I8086 = 2,
I086 = 3,
I186 = 4,
I286 = 5,
I386 = 6,
I486 = 7,
I586 = 8,
I686 = 9,
I786 = 35,
X86_64 = 10,
Arm = 11,
ArmBe = 12,
Aarch64 = 13,
Aarch64Be = 14,
Aarch64_32 = 15,
Mips = 16,
MipsLE = 17,
Mips64 = 18,
Mips64LE = 19,
PowerPC32 = 20,
PowerPC64 = 21,
PowerPC64le = 22,
RiscV32 = 23,
RiscV64 = 24,
Sparc = 25,
SparcV9 = 26,
SparcEL = 27,
Wasm32 = 28,
Wasm64 = 29,
Wc65c816 = 30,
M6502 = 31,
M65C02 = 32,
SPC700 = 33,
Clever = 34,
HoleyBytes = 36,
Null = 4_294_967_295,
// some variants omitted
}
Expand description
The Architecture field of a target tuple
Variants§
Unknown = 0
I86 = 1
I8086 = 2
I086 = 3
I186 = 4
I286 = 5
I386 = 6
I486 = 7
I586 = 8
I686 = 9
I786 = 35
X86_64 = 10
Arm = 11
ArmBe = 12
Aarch64 = 13
Aarch64Be = 14
Aarch64_32 = 15
Mips = 16
MipsLE = 17
Mips64 = 18
Mips64LE = 19
PowerPC32 = 20
PowerPC64 = 21
PowerPC64le = 22
RiscV32 = 23
RiscV64 = 24
Sparc = 25
SparcV9 = 26
SparcEL = 27
Wasm32 = 28
Wasm64 = 29
Wc65c816 = 30
M6502 = 31
M65C02 = 32
SPC700 = 33
Clever = 34
HoleyBytes = 36
Null = 4_294_967_295
Used for ABI Purposes with lccc
Implementations§
Source§impl Architecture
impl Architecture
Sourcepub fn parse(st: &str) -> Self
pub fn parse(st: &str) -> Self
Parses the Architecture in a “lossy” manner
This is equivalent to Self::from_str
, but returns Architecture::Unknown
, instead of an error,
on an unknown architecture.
This is useful (in conjunction with an actual target name)
Sourcepub fn canonical_name(&self) -> &'static str
pub fn canonical_name(&self) -> &'static str
Returns the canonical name of the target
The canonical name, when passed into [
Self::parse`] will yield an equivalent value,
Formatting an Architecture yields this string
pub fn is_x86(&self) -> bool
Trait Implementations§
Source§impl Clone for Architecture
impl Clone for Architecture
Source§fn clone(&self) -> Architecture
fn clone(&self) -> Architecture
Returns a duplicate 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 Architecture
impl Debug for Architecture
Source§impl Display for Architecture
impl Display for Architecture
Source§impl FromStr for Architecture
impl FromStr for Architecture
Source§impl Hash for Architecture
impl Hash for Architecture
Source§impl PartialEq for Architecture
impl PartialEq for Architecture
impl Copy for Architecture
impl Eq for Architecture
impl StructuralPartialEq for Architecture
Auto Trait Implementations§
impl Freeze for Architecture
impl RefUnwindSafe for Architecture
impl Send for Architecture
impl Sync for Architecture
impl Unpin for Architecture
impl UnwindSafe for Architecture
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