Enum symbolic_common::Arch [−][src]
An enumeration of CPU architectures and variants.
The architectues are grouped into families, which can be retrieved by cpu_family
. There are
*Unknown
variants for each architecture to maintain forward-compatibility. This allows to
support architectures where the family is known but the subtype is not.
Each architecture has a canonical name, returned by Arch::name
. Likewise, architectures can
be parsed from their string names. In addition to that, in some cases aliases are supported. For
instance, "x86"
is aliased as "i386"
.
This enumeration is represented as u32
for C-bindings and lowlevel APIs. The values are
grouped by CPU family for forward compatibility.
Variants (Non-exhaustive)
Implementations
impl Arch
[src]
pub fn from_u32(val: u32) -> Arch
[src]
Creates an Arch
from its u32
representation.
Returns Arch::Unknown
for all unknown values.
Examples
use symbolic_common::Arch; // Will print "X86" println!("{:?}", Arch::from_u32(101));
pub fn cpu_family(self) -> CpuFamily
[src]
Returns the CPU family of the CPU architecture.
Examples
use symbolic_common::Arch; // Will print "Intel32" println!("{:?}", Arch::X86.cpu_family());
pub fn name(self) -> &'static str
[src]
Returns the canonical name of the CPU architecture.
This follows the Apple conventions for naming architectures. For instance, Intel 32-bit
architectures are canonically named "x86"
, even though "i386"
would also be a valid
name.
For architectures with variants or subtypes, that subtype is encoded into the name. For instance the ARM v7-M architecture is named with a full `“armv7m”.
Examples
use symbolic_common::Arch; // Will print "x86" println!("{}", Arch::X86.name());
pub fn well_known(self) -> bool
[src]
Returns whether this architecture is well-known.
This is trivially true
for all architectures other than the *Unknown
variants.
Examples
use symbolic_common::Arch; assert!(Arch::X86.well_known()); assert!(!Arch::X86Unknown.well_known());
Trait Implementations
impl Clone for Arch
[src]
impl Copy for Arch
[src]
impl Debug for Arch
[src]
impl Default for Arch
[src]
impl Display for Arch
[src]
impl Eq for Arch
[src]
impl FromStr for Arch
[src]
type Err = UnknownArchError
The associated error which can be returned from parsing.
fn from_str(string: &str) -> Result<Arch, UnknownArchError>
[src]
impl Hash for Arch
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Ord for Arch
[src]
fn cmp(&self, other: &Arch) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl PartialEq<Arch> for Arch
[src]
impl PartialOrd<Arch> for Arch
[src]
fn partial_cmp(&self, other: &Arch) -> Option<Ordering>
[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl StructuralEq for Arch
[src]
impl StructuralPartialEq for Arch
[src]
Auto Trait Implementations
impl RefUnwindSafe for Arch
impl Send for Arch
impl Sync for Arch
impl Unpin for Arch
impl UnwindSafe for Arch
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
[src]
V: MultiLane<T>,