Trait StacktraceExt

Source
pub trait StacktraceExt {
    // Required methods
    fn from_gdb<T: AsRef<str>>(trace: T) -> Result<Stacktrace>;
    fn compute_module_offsets(&mut self, mappings: &MappedFiles);
    fn strip_prefix<T: AsRef<str>>(&mut self, prefix: T);
}

Required Methods§

Source

fn from_gdb<T: AsRef<str>>(trace: T) -> Result<Stacktrace>

Get stack trace as a string and converts it into ‘Stacktrace’

§Arguments
  • ‘trace’ - stack trace from gdb
§Return value

The return value is a ‘Stacktrace’ struct

Source

fn compute_module_offsets(&mut self, mappings: &MappedFiles)

Compute module offsets for stack trace entries based on mapped files. Gdb doesn’t print module and offset in stack trace.

§Arguments
  • ‘mappings’ - information about mapped files
Source

fn strip_prefix<T: AsRef<str>>(&mut self, prefix: T)

Strip prefix from source file path for all StacktraceEntry’s

§Arguments
  • ‘prefix’ - path prefix

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§