pub struct StackTraceCapture { /* private fields */ }Expand description
High-performance stack trace capture engine
Implementations§
Source§impl StackTraceCapture
impl StackTraceCapture
Sourcepub fn new(config: CaptureConfig) -> Self
pub fn new(config: CaptureConfig) -> Self
Create new stack trace capture instance with given configuration
Sourcepub fn capture(&mut self) -> Option<Vec<StackFrame>>
pub fn capture(&mut self) -> Option<Vec<StackFrame>>
Capture full stack trace with symbol resolution Returns None if capture is disabled
Sourcepub fn capture_lightweight(&self) -> Option<Vec<usize>>
pub fn capture_lightweight(&self) -> Option<Vec<usize>>
Capture lightweight stack trace (instruction pointers only) Much faster than full capture, suitable for hot paths
Sourcepub fn is_enabled(&self) -> bool
pub fn is_enabled(&self) -> bool
Check if capture is currently enabled
Sourcepub fn get_capture_count(&self) -> usize
pub fn get_capture_count(&self) -> usize
Get total number of captures performed
Sourcepub fn clear_cache(&mut self)
pub fn clear_cache(&mut self)
Clear the symbol resolution cache
Sourcepub fn cache_size(&self) -> usize
pub fn cache_size(&self) -> usize
Get current size of symbol cache
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for StackTraceCapture
impl RefUnwindSafe for StackTraceCapture
impl Send for StackTraceCapture
impl Sync for StackTraceCapture
impl Unpin for StackTraceCapture
impl UnwindSafe for StackTraceCapture
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more