pub enum SadnessFlavor {
Abort,
Segfault,
DivideByZero,
Illegal,
Bus,
Trap,
StackOverflow {
non_rust_thread: bool,
long_jumps: bool,
},
}
Expand description
How you would like your sadness.
Variants§
Abort
SIGABRT
Note that on Windows, std::process::abort
, the canonical way to
abort processes in Rust, uses the fastfail
intrinsic, which neither raises a SIGABRT
signal, nor issue a Windows
exception. The method in this library always uses libc::abort
Segfault
SIGSEGV
on LinuxEXCEPTION_ACCESS_VIOLATION
on WindowsEXC_BAD_ACCESS
on Macos
DivideByZero
SIGFPE
on LinuxEXCEPTION_INT_DIVIDE_BY_ZERO
on WindowsEXC_ARITHMETIC
on Macos
Illegal
SIGILL
on LinuxEXCEPTION_ILLEGAL_INSTRUCTION
on WindowsEXC_BAD_INSTRUCTION
on Macos
Bus
SIGBUS
on LinuxEXC_BAD_ACCESS
on Macos
Trap
SIGTRAP
on LinuxEXCEPTION_BREAKPOINT
on WindowsEXC_BREAKPOINT
on Macos
StackOverflow
SIGSEGV
on LinuxEXCEPTION_STACK_OVERFLOW
on WindowsEXC_BAD_ACCESS
on Macos
Fields
§
non_rust_thread: bool
Raises the signal/exception from a non-std::thread::Thread
Implementations§
Trait Implementations§
Source§impl Clone for SadnessFlavor
impl Clone for SadnessFlavor
Source§fn clone(&self) -> SadnessFlavor
fn clone(&self) -> SadnessFlavor
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 SadnessFlavor
impl Debug for SadnessFlavor
Source§impl PartialEq for SadnessFlavor
impl PartialEq for SadnessFlavor
impl Copy for SadnessFlavor
impl Eq for SadnessFlavor
impl StructuralPartialEq for SadnessFlavor
Auto Trait Implementations§
impl Freeze for SadnessFlavor
impl RefUnwindSafe for SadnessFlavor
impl Send for SadnessFlavor
impl Sync for SadnessFlavor
impl Unpin for SadnessFlavor
impl UnwindSafe for SadnessFlavor
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