#[repr(i32)]pub enum ExceptionType {
Show 13 variants
BadAccess = 1,
BadInstruction = 2,
Arithmetic = 3,
Emulation = 4,
Software = 5,
Breakpoint = 6,
Syscall = 7,
MachSyscall = 8,
RpcAlert = 9,
Crash = 10,
Resource = 11,
Guard = 12,
CorpseNotify = 13,
}Expand description
Mach exception types mirroring mach/exception_types.h
Variants§
BadAccess = 1
BadInstruction = 2
Arithmetic = 3
Emulation = 4
Software = 5
Breakpoint = 6
Syscall = 7
MachSyscall = 8
RpcAlert = 9
Crash = 10
Resource = 11
Guard = 12
CorpseNotify = 13
Implementations§
Source§impl ExceptionType
impl ExceptionType
Sourcepub fn from_raw(val: i32) -> Option<Self>
pub fn from_raw(val: i32) -> Option<Self>
Converts a raw i32 value to an ExceptionType, if valid.
Returns None for values outside the range 1..=13.
§Examples
use crashrustler::ExceptionType;
let exc = ExceptionType::from_raw(1).unwrap();
assert_eq!(exc, ExceptionType::BadAccess);
assert_eq!(exc.raw(), 1);
assert!(ExceptionType::from_raw(0).is_none());
assert!(ExceptionType::from_raw(99).is_none());Trait Implementations§
Source§impl Clone for ExceptionType
impl Clone for ExceptionType
Source§fn clone(&self) -> ExceptionType
fn clone(&self) -> ExceptionType
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 ExceptionType
impl Debug for ExceptionType
Source§impl PartialEq for ExceptionType
impl PartialEq for ExceptionType
impl Copy for ExceptionType
impl Eq for ExceptionType
impl StructuralPartialEq for ExceptionType
Auto Trait Implementations§
impl Freeze for ExceptionType
impl RefUnwindSafe for ExceptionType
impl Send for ExceptionType
impl Sync for ExceptionType
impl Unpin for ExceptionType
impl UnsafeUnpin for ExceptionType
impl UnwindSafe for ExceptionType
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