# Struct backtrace::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`

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]`

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 Clone for Backtrace`
[src]

#### `fn clone(&self) -> Backtrace`

Returns a copy of the value. Read more

#### `fn clone_from(&mut self, source: &Self)`
1.0.0

Performs copy-assignment from `source`. Read more

### `impl From<Vec<BacktraceFrame>> for Backtrace`
[src]

#### `fn from(frames: Vec<BacktraceFrame>) -> Self`

Performs the conversion.

### `impl Into<Vec<BacktraceFrame>> for Backtrace`
[src]

#### `fn into(self) -> Vec<BacktraceFrame>`

Performs the conversion.

### `impl Debug for Backtrace`
[src]

#### `fn fmt(&self, fmt: &mut Formatter) -> Result`

Formats the value using the given formatter.

### `impl Default for Backtrace`
[src]

#### `fn default() -> Backtrace`

Returns the "default value" for a type. Read more

# Help

## Keyboard Shortcuts

?
  Show this help dialog
S
  Focus the search field
⇤
  Move up in search results
⇥
  Move down in search results
⏎
  Go to active search result
+
  Collapse/expand all sections

## Search Tricks

Prefix searches with a type followed by a colon (e.g. `fn:`) to restrict the search to a given type.

Accepted types are: `fn`, `mod`, `struct`, `enum`, `trait`, `type`, `macro`, and `const`.

Search functions by type signature (e.g. `vec -> usize` or `* -> vec`)