#[repr(u8)]pub enum RustBacktrace {
Disabled = 1,
Enabled = 2,
Full = 3,
}Expand description
Whether backtrace capture is enabled, and how verbosely it should render.
Resolved once from the environment (see rust_backtrace) following the
same convention as std: RUST_LIB_BACKTRACE is consulted first and, if
unset, RUST_BACKTRACE.
Variants§
Disabled = 1
Capture disabled — no frames are recorded.
Enabled = 2
Capture enabled, rendered as the trimmed “short” view.
Full = 3
Capture enabled, rendered untrimmed — every frame is shown.
Implementations§
Source§impl RustBacktrace
impl RustBacktrace
Sourcepub fn detect_opt() -> Option<Self>
pub fn detect_opt() -> Option<Self>
The environment-derived setting, or None when neither
RUST_LIB_BACKTRACE nor RUST_BACKTRACE is set. The environment is
read once and cached for the life of the process.
Sourcepub fn detect_panic_opt() -> Option<Self>
pub fn detect_panic_opt() -> Option<Self>
Panic-path detection: consults only RUST_BACKTRACE, mirroring std’s
panic handler. RUST_LIB_BACKTRACE deliberately has no effect here —
it exists to control library error capture independently of panics.
Sourcepub const fn is_enabled(self) -> bool
pub const fn is_enabled(self) -> bool
Whether frames should be captured at all.
Trait Implementations§
Source§impl Clone for RustBacktrace
impl Clone for RustBacktrace
Source§fn clone(&self) -> RustBacktrace
fn clone(&self) -> RustBacktrace
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more