Enum target_tuples::Architecture
source · #[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 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 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
source§fn eq(&self, other: &Architecture) -> bool
fn eq(&self, other: &Architecture) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for Architecture
impl Eq for Architecture
impl StructuralEq for Architecture
impl StructuralPartialEq for Architecture
Auto Trait Implementations§
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