Struct Frame
pub struct Frame { pub(crate) inner: Frame }
A trait representing one frame of a backtrace, yielded to the trace
function of this crate.
The tracing function's closure will be yielded frames, and the frame is virtually dispatched as the underlying implementation is not always known until runtime.
Fields
inner: Frame
Implementations
impl Frame
fn ip(&self) -> *mut c_voidReturns the current instruction pointer of this frame.
This is normally the next instruction to execute in the frame, but not all implementations list this with 100% accuracy (but it's generally pretty close).
It is recommended to pass this value to
backtrace::resolveto turn it into a symbol name.fn sp(&self) -> *mut c_voidReturns the current stack pointer of this frame.
In the case that a backend cannot recover the stack pointer for this frame, a null pointer is returned.
fn symbol_address(&self) -> *mut c_voidReturns the starting symbol address of the frame of this function.
This will attempt to rewind the instruction pointer returned by
ipto the start of the function, returning that value. In some cases, however, backends will just returnipfrom this function.The returned value can sometimes be used if
backtrace::resolvefailed on theipgiven above.fn module_base_address(&self) -> Option<*mut c_void>Returns the base address of the module to which the frame belongs.
Trait Implementations
impl Clone for Frame
fn clone(&self) -> Frame
impl Debug for Frame
fn fmt(&self, f: &mut Formatter<'_>) -> Result
Auto Trait Implementations
impl Freeze for Frame
impl RefUnwindSafe for Frame
impl Send for Frame
impl Sync for Frame
impl Unpin for Frame
impl UnsafeUnpin for Frame
impl UnwindSafe for Frame
Blanket Implementations
impl<T> Any for Frame
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for Frame
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for Frame
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> CloneToUninit for Frame
where
T: Clone,
unsafe fn clone_to_uninit(&self, dest: *mut u8)
impl<T> From<T> for Frame
fn from(t: T) -> TReturns the argument unchanged.
impl<T> SizeHint for Frame
where
T: ?Sized,
fn lower_bound(&self) -> usizefn upper_bound(&self) -> Option<usize>
impl<T> SizedTypeProperties for Frame
impl<T> ToOwned for Frame
where
T: Clone,
type Owned = T;fn to_owned(&self) -> Tfn clone_into(&self, target: &mut T)
impl<T, U> Into<U> for Frame
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for Frame
where
U: Into<T>,
type Error = Infallible;fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto<U> for Frame
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>