Struct error_chain::Backtrace
[−]
[src]
pub struct Backtrace { /* fields omitted */ }
Representation of an owned and self-contained backtrace.
This structure can be used to capture a backtrace at various points in a program and later used to inspect what the backtrace was at that time.
Methods
impl Backtrace
[src]
fn new() -> Backtrace
[src]
Captures a backtrace at the callsite of this function, returning an owned representation.
This function is useful for representing a backtrace as an object in Rust. This returned value can be sent across threads and printed elsewhere, and thie purpose of this value is to be entirely self contained.
Examples
use backtrace::Backtrace; let current_backtrace = Backtrace::new();
fn frames(&self) -> &[BacktraceFrame]
[src]
Returns the frames from when this backtrace was captured.
The first entry of this slice is likely the function Backtrace::new
,
and the last frame is likely something about how this thread or the main
function started.
Trait Implementations
impl Into<Vec<BacktraceFrame>> for Backtrace
[src]
fn into(self) -> Vec<BacktraceFrame>
[src]
Performs the conversion.
impl Default for Backtrace
[src]
impl Clone for Backtrace
[src]
impl From<Vec<BacktraceFrame>> for Backtrace
[src]
fn from(frames: Vec<BacktraceFrame>) -> Backtrace
[src]
Performs the conversion.