pub struct Backtrace { /* private fields */ }Expand description
A captured OS thread stack backtrace.
Internally stores frames as a Box<[Frame]> (trimmed to actual length).
Capture uses a stack-allocated scratch buffer so the FP walking loop
itself is allocation-free; the single Box allocation happens only after
the walk completes.
Implementations§
Source§impl Backtrace
impl Backtrace
Sourcepub fn capture_trap(fp: usize, ip: usize, ra: usize) -> Self
pub fn capture_trap(fp: usize, ip: usize, ra: usize) -> Self
Capture the stack backtrace from a trap.
fp: frame pointer from the trap contextip: faulting instruction pointer (the PC from the trap frame)ra: return address (link register). On x86_64 this is always 0 since the return address is stored on the stack as part of the FP chain.
Trait Implementations§
impl Eq for Backtrace
Source§impl Ord for Backtrace
impl Ord for Backtrace
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for Backtrace
impl PartialOrd for Backtrace
impl StructuralPartialEq for Backtrace
Auto Trait Implementations§
impl Freeze for Backtrace
impl RefUnwindSafe for Backtrace
impl Send for Backtrace
impl Sync for Backtrace
impl Unpin for Backtrace
impl UnsafeUnpin for Backtrace
impl UnwindSafe for Backtrace
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