Trait snafu::GenerateBacktrace[][src]

pub trait GenerateBacktrace {
    fn generate() -> Self;
fn as_backtrace(&self) -> Option<&Backtrace>; }

Construct a backtrace, allowing it to be optional.

Required methods

fn generate() -> Self[src]

Generate a new backtrace instance

fn as_backtrace(&self) -> Option<&Backtrace>[src]

Retrieve the optional backtrace

Loading content...

Implementations on Foreign Types

impl GenerateBacktrace for Option<Backtrace>[src]

Only create a backtrace when an environment variable is set.

This looks first for the value of RUST_LIB_BACKTRACE then RUST_BACKTRACE. If the value is set to 1, backtraces will be enabled.

This value will be tested only once per program execution; changing the environment variable after it has been checked will have no effect.

Loading content...

Implementors

impl GenerateBacktrace for Backtrace[src]

Loading content...