Trait snafu::GenerateBacktrace[][src]

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

Construct a backtrace, allowing it to be optional.

Required methods

Generate a new backtrace instance

Retrieve the optional backtrace

Implementations on Foreign Types

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.

Implementors