Crate backtrace_parser

Source
Expand description

This crate implements a parser for backtraces.

The aim is to parse backtraces in the standard format that any Rust program can generate, for instance when crashing due to a panic, by creating a failure::Error, or by using the backtrace crate directly.

The parser follows a zero-copy approach, which means that the input string can be provided by reference, and will not be copied during parsing. This has the effect that parsing a captured backtrace tends to be very performant.

§Example

use backtrace_parser::Backtrace;

let backtrace = Backtrace::parse(input).unwrap();

for frame in backtrace.frames() {
    for symbol in frame.symbols() {
        println!("symbol: {:?}", symbol);
    }
}

Structs§

Backtrace
Represents a parsed backtrace.
Error
Represents a parser error.
Frame
Represents a parsed stack frame.
Frames
Iterator over the stack frames in a parsed backtrace.
Symbol
Represents a parsed symbol.
Symbols
Iterator over the symbols in a parsed stack frame.