Enum symbolic::common::Arch[][src]

#[repr(u32)]
#[non_exhaustive]
pub enum Arch {
Show variants Unknown, X86, X86Unknown, Amd64, Amd64h, Amd64Unknown, Arm, ArmV5, ArmV6, ArmV6m, ArmV7, ArmV7f, ArmV7s, ArmV7k, ArmV7m, ArmV7em, ArmUnknown, Arm64, Arm64V8, Arm64e, Arm64Unknown, Ppc, Ppc64, Mips, Mips64, Arm64_32, Arm64_32V8, Arm64_32Unknown, Wasm32,
}
Expand description

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)

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Unknown
X86
X86Unknown
Amd64
Amd64h
Amd64Unknown
Arm
ArmV5
ArmV6
ArmV6m
ArmV7
ArmV7f
ArmV7s
ArmV7k
ArmV7m
ArmV7em
ArmUnknown
Arm64
Arm64V8
Arm64e
Arm64Unknown
Ppc
Ppc64
Mips
Mips64
Arm64_32
Arm64_32V8
Arm64_32Unknown
Wasm32

Implementations

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));

Returns the CPU family of the CPU architecture.

Examples

use symbolic_common::Arch;

// Will print "Intel32"
println!("{:?}", Arch::X86.cpu_family());

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());

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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Deserialize this value from the given Serde deserializer. Read more

Formats the value using the given formatter. Read more

The associated error which can be returned from parsing.

Parses a string s to return a value of this type. Read more

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

This method returns an Ordering between self and other. Read more

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

Restrict a value to a certain interval. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Converts self into T using Into<T>. Read more

Converts self into a target type. Read more

Given the context attached to a nom error, and given the original input to the nom parser, extract more the useful context information. Read more

Causes self to use its Binary implementation when Debug-formatted.

Causes self to use its Display implementation when Debug-formatted. Read more

Causes self to use its LowerExp implementation when Debug-formatted. Read more

Causes self to use its LowerHex implementation when Debug-formatted. Read more

Causes self to use its Octal implementation when Debug-formatted.

Causes self to use its Pointer implementation when Debug-formatted. Read more

Causes self to use its UpperExp implementation when Debug-formatted. Read more

Causes self to use its UpperHex implementation when Debug-formatted. Read more

Performs the conversion.

Wrap this object so that its Display representation is indented with the given indent. Each non-empty line of the formatted output will be prefixed with the indent. Read more

Wrap this object so that its Display representation is indented with the given indent. Each non-empty line except for the first of the formatted output will be prefixed with the indent. Read more

Performs the conversion.

Pipes by value. This is generally the method you want to use. Read more

Borrows self and passes that borrow into the pipe function. Read more

Mutably borrows self and passes that borrow into the pipe function. Read more

Borrows self, then passes self.borrow() into the pipe function. Read more

Mutably borrows self, then passes self.borrow_mut() into the pipe function. Read more

Borrows self, then passes self.as_ref() into the pipe function.

Mutably borrows self, then passes self.as_mut() into the pipe function. Read more

Borrows self, then passes self.deref() into the pipe function.

Mutably borrows self, then passes self.deref_mut() into the pipe function. Read more

Pipes a value into a function that cannot ordinarily be called in suffix position. Read more

Pipes a trait borrow into a function that cannot normally be called in suffix position. Read more

Pipes a trait mutable borrow into a function that cannot normally be called in suffix position. Read more

Pipes a trait borrow into a function that cannot normally be called in suffix position. Read more

Pipes a trait mutable borrow into a function that cannot normally be called in suffix position. Read more

Pipes a dereference into a function that cannot normally be called in suffix position. Read more

Pipes a mutable dereference into a function that cannot normally be called in suffix position. Read more

Pipes a reference into a function that cannot ordinarily be called in suffix position. Read more

Pipes a mutable reference into a function that cannot ordinarily be called in suffix position. Read more

Given the original input, as well as the context reported by nom, recreate a context in the original string where the error occurred. Read more

Immutable access to a value. Read more

Mutable access to a value. Read more

Immutable access to the Borrow<B> of a value. Read more

Mutable access to the BorrowMut<B> of a value. Read more

Immutable access to the AsRef<R> view of a value. Read more

Mutable access to the AsMut<R> view of a value. Read more

Immutable access to the Deref::Target of a value. Read more

Mutable access to the Deref::Target of a value. Read more

Calls .tap() only in debug builds, and is erased in release builds.

Calls .tap_mut() only in debug builds, and is erased in release builds. Read more

Calls .tap_borrow() only in debug builds, and is erased in release builds. Read more

Calls .tap_borrow_mut() only in debug builds, and is erased in release builds. Read more

Calls .tap_ref() only in debug builds, and is erased in release builds. Read more

Calls .tap_ref_mut() only in debug builds, and is erased in release builds. Read more

Calls .tap_deref() only in debug builds, and is erased in release builds. Read more

Calls .tap_deref_mut() only in debug builds, and is erased in release builds. Read more

Provides immutable access for inspection. Read more

Calls tap in debug builds, and does nothing in release builds.

Provides mutable access for modification. Read more

Calls tap_mut in debug builds, and does nothing in release builds.

Provides immutable access to the reference for inspection.

Calls tap_ref in debug builds, and does nothing in release builds.

Provides mutable access to the reference for modification.

Calls tap_ref_mut in debug builds, and does nothing in release builds.

Provides immutable access to the borrow for inspection. Read more

Calls tap_borrow in debug builds, and does nothing in release builds.

Provides mutable access to the borrow for modification.

Calls tap_borrow_mut in debug builds, and does nothing in release builds. Read more

Immutably dereferences self for inspection.

Calls tap_deref in debug builds, and does nothing in release builds.

Mutably dereferences self for modification.

Calls tap_deref_mut in debug builds, and does nothing in release builds. Read more

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

Converts the given value to a String. Read more

Attempts to convert self into T using TryInto<T>. Read more

Attempts to convert self into a target type. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.