Trait snafu::GenerateBacktrace
source · [−]pub trait GenerateBacktrace {
fn generate() -> Self;
fn as_backtrace(&self) -> Option<&Backtrace>;
}
Expand description
Construct a backtrace, allowing it to be optional.
Required Methods
fn as_backtrace(&self) -> Option<&Backtrace>
fn as_backtrace(&self) -> Option<&Backtrace>
Retrieve the optional backtrace
Implementations on Foreign Types
sourceimpl GenerateBacktrace for Option<Backtrace>
impl GenerateBacktrace for Option<Backtrace>
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.