Skip to main content

Crate oopsie_core

Crate oopsie_core 

Source
Expand description

Core error types and utilities.

std is on by default; build with default-features = false for no_std + alloc targets (an allocator is always required — bring your own with extern crate alloc and a global allocator in the consumer). Backtrace capture, panic-hook integration, tracing, and clock-based timestamps (chrono / jiff) require std; under no_std, Backtrace is an always-empty stub so the rest of the API keeps its shape.

Re-exports§

pub extern crate alloc;

Modules§

erased
Serializable, type-erased error representations (the serde feature).
extras
Ready-made Capturable types for ambient process and environment state.
test_utils
Shared helpers for the integration-test suites of the consumer crates.
tracing
tracing integration helpers.

Macros§

redact
Run a block with a named settings redaction profile bound, so the snapshots asserted inside it use the shared normalization filters.
snap_name
Build a snapshot name from a base label plus the channel and target triple, keeping platform- and toolchain-specific snapshots in separate files.
start_marker
Marks the start of meaningful backtraces on the current thread: frames below this call are hidden from rendered error and panic traces. The function containing the call stays visible. A later call replaces the marker; other threads are unaffected. RUST_BACKTRACE=full renders traces unfiltered, ignoring markers. Hiding is applied by the fancy feature’s renderers; without that feature the marker is recorded but has no effect.

Structs§

Backtrace
A captured stack backtrace with deferred symbol resolution.
Chain
An iterator over an error and its chain of source causes.
ErrorCode
An opaque error code, used for programmatic handling and matching.
HelpText
User-facing help text, intended to be shown in diagnostics.
NoSource
The stand-in “source” a leaf selector (one with no source field) builds from. Option::context uses it as the source when there is no error value to attach. You normally reach a leaf error through .build() / .fail() / Option::context, so you rarely name this directly.
OptionalSpanTrace
A wrapper around Option<SpanTrace> that implements Capturable.
SpanTrace
A wrapper around tracing_error::SpanTrace.
Welp
A string-shaped error type for prototypes, one-off errors, and quick string contexts.

Enums§

RustBacktrace
Whether backtrace capture is enabled, and how verbosely it should render.
SpanTraceStatus
The status of a SpanTrace: whether it was captured, or why it is empty.

Traits§

AsErrorSource
Normalize any source-error value to a &(dyn Error + 'static).
Capturable
A value that fills itself in when an error is constructed.
Contextual
Builds a target error from a context selector and a source error of type E.
Diagnostic
Trait for errors that expose diagnostic data.
ErrorChainExt
Walk an error and its source chain.
OptionExt
Extension trait on Option for converting None into a typed error.
ResultExt
Extension trait on Result for ergonomic error context wrapping.
WelpOptionExt
Extension trait on Option for converting None into a Welp.
WelpResultExt
Extension trait on Result for attaching a string message that produces a Welp.

Functions§

clear_rust_backtrace_override
Remove any override set by set_rust_backtrace_override on the current thread, reverting rust_backtrace to the environment-derived value.
rust_backtrace
The effective backtrace setting for the current thread.
rust_panic_backtrace
The effective panic backtrace setting for the current thread: the thread-local override if present, else RUST_BACKTRACE (only).
set_rust_backtrace_override
Force rust_backtrace to return value on the current thread, taking precedence over the environment until clear_rust_backtrace_override.
with_rust_backtrace_override
Run f with the thread’s backtrace setting forced to value, restoring the previous override (or lack of one) afterwards — including on unwind.