pub struct TraceOptions { /* private fields */ }
Expand description
Options controlling tracing.
Implementations§
Source§impl TraceOptions
impl TraceOptions
Sourcepub fn new() -> TraceOptions
pub fn new() -> TraceOptions
Returns a new TraceOptions
with default settings.
Sourcepub fn snapshot(&mut self, snapshot: bool) -> &mut TraceOptions
pub fn snapshot(&mut self, snapshot: bool) -> &mut TraceOptions
If set, the threads of the process will be traced in a consistent snapshot.
A snapshot-mode trace ensures a consistent view of all threads, but requires that all threads be paused for the entire duration of the trace.
Defaults to false
.
Sourcepub fn trace(&self, child: &mut Command) -> Result<Trace>
pub fn trace(&self, child: &mut Command) -> Result<Trace>
Returns stack traces of all of the threads in the calling process.
The provided Command
should be configured to spawn a process which will call the child
function. It must not use standard input or standard output, but standard error will be
inherited and can be used. The spawned process must “directly” call child
rather than
spawning another process to call it. That is, the parent of the process that calls child
is
the one that will be traced.
Trait Implementations§
Source§impl Clone for TraceOptions
impl Clone for TraceOptions
Source§fn clone(&self) -> TraceOptions
fn clone(&self) -> TraceOptions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more