Struct minidump_writer::minidump_writer::MinidumpWriter
source · pub struct MinidumpWriter { /* private fields */ }
Implementations§
source§impl MinidumpWriter
impl MinidumpWriter
sourcepub fn new(task: Option<task_t>, handler_thread: Option<thread_t>) -> Self
pub fn new(task: Option<task_t>, handler_thread: Option<thread_t>) -> Self
Creates a minidump writer for the specified mach task (process) and handler thread. If not specified, defaults to the current task and thread.
use minidump_writer::{minidump_writer::MinidumpWriter, mach2};
// Note that this is the same as specifying `None` for both the task and
// handler thread, this is just meant to illustrate how you can setup
// a MinidumpWriter manually instead of using a `CrashContext`
// SAFETY: syscalls
let mdw = unsafe {
MinidumpWriter::new(
Some(mach2::traps::mach_task_self()),
Some(mach2::mach_init::mach_thread_self()),
)
};
sourcepub fn with_crash_context(crash_context: CrashContext) -> Self
pub fn with_crash_context(crash_context: CrashContext) -> Self
Creates a minidump writer with the specified crash context, presumably for another task
Auto Trait Implementations§
impl Freeze for MinidumpWriter
impl RefUnwindSafe for MinidumpWriter
impl Send for MinidumpWriter
impl Sync for MinidumpWriter
impl Unpin for MinidumpWriter
impl UnwindSafe for MinidumpWriter
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