pub struct CrashHandler;Expand description
A Macos exception handler
Implementations§
Source§impl CrashHandler
impl CrashHandler
Sourcepub fn attach(on_crash: Box<dyn CrashEvent>) -> Result<Self, Error>
pub fn attach(on_crash: Box<dyn CrashEvent>) -> Result<Self, Error>
Attaches the exception handler.
The provided callback will be invoked if an exception is caught,
providing a crate::CrashContext with the details of the thread where
the exception was thrown.
Sourcepub fn detach(self)
pub fn detach(self)
Detaches the handler.
This is done automatically when CrashHandler is dropped.
pub fn simulate_exception(&self, exception_info: Option<ExceptionInfo>) -> bool
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CrashHandler
impl RefUnwindSafe for CrashHandler
impl Send for CrashHandler
impl Sync for CrashHandler
impl Unpin for CrashHandler
impl UnwindSafe for CrashHandler
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