pub struct CpuType(pub i32);Expand description
CPU type constants mirroring mach/machine.h
Tuple Fields§
§0: i32Implementations§
Source§impl CpuType
impl CpuType
Sourcepub fn is_64_bit(&self) -> bool
pub fn is_64_bit(&self) -> bool
Returns true if this CPU type has the 64-bit flag set (bit 24).
§Examples
use crashrustler::CpuType;
assert!(CpuType::X86_64.is_64_bit());
assert!(CpuType::ARM64.is_64_bit());
assert!(!CpuType::X86.is_64_bit());
assert!(!CpuType::ARM.is_64_bit());Sourcepub fn with_64_bit(self) -> Self
pub fn with_64_bit(self) -> Self
Returns a new CpuType with the 64-bit flag (bit 24) set.
§Examples
use crashrustler::CpuType;
let cpu64 = CpuType::X86.with_64_bit();
assert_eq!(cpu64, CpuType::X86_64);
assert!(cpu64.is_64_bit());Trait Implementations§
impl Copy for CpuType
impl Eq for CpuType
impl StructuralPartialEq for CpuType
Auto Trait Implementations§
impl Freeze for CpuType
impl RefUnwindSafe for CpuType
impl Send for CpuType
impl Sync for CpuType
impl Unpin for CpuType
impl UnsafeUnpin for CpuType
impl UnwindSafe for CpuType
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