Enum sadness_generator::SadnessFlavor
source · 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
Fields
non_rust_thread: bool
Raises the signal/exception from a non-std::thread::Thread
long_jumps: bool
If using a native thread and there is a signal handler that longjumps, we can’t wait on the thread as we would normally as it would deadlock
SIGSEGV
on LinuxEXCEPTION_STACK_OVERFLOW
on WindowsEXC_BAD_ACCESS
on Macos
Implementations
Trait Implementations
sourceimpl Clone for SadnessFlavor
impl Clone for SadnessFlavor
sourcefn clone(&self) -> SadnessFlavor
fn clone(&self) -> SadnessFlavor
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for SadnessFlavor
impl Debug for SadnessFlavor
sourceimpl PartialEq<SadnessFlavor> for SadnessFlavor
impl PartialEq<SadnessFlavor> for SadnessFlavor
sourcefn eq(&self, other: &SadnessFlavor) -> bool
fn eq(&self, other: &SadnessFlavor) -> bool
impl Copy for SadnessFlavor
impl Eq for SadnessFlavor
impl StructuralEq for SadnessFlavor
impl StructuralPartialEq for SadnessFlavor
Auto Trait Implementations
impl RefUnwindSafe for SadnessFlavor
impl Send for SadnessFlavor
impl Sync for SadnessFlavor
impl Unpin for SadnessFlavor
impl UnwindSafe for SadnessFlavor
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more