Skip to main content

Module frames

Module frames 

Source
Expand description

Extract, classify and render backtrace frames for the clean error formatter.

Shows only our-code frames: the raise line (from the captured std::panic::Location when meaningful, else the backtrace) plus our-code callers, with runs of third-party and runtime frames collapsed into a β€œN framework frames hidden” marker. Pure functions over FrameView so they unit-test without a real backtrace.

StructsΒ§

FrameView
A stack frame reduced to what we display and classify on.

EnumsΒ§

Kind πŸ”’

ConstantsΒ§

INFRA_FILE_FRAGMENTS πŸ”’
Path fragments identifying error-infrastructure files.
INFRA_SYMBOL_FRAGMENTS πŸ”’
Symbol substrings marking a frame as error construction/conversion.

FunctionsΒ§

classify πŸ”’
clean_function
Reduce a demangled symbol to its last segment, dropping ::{{closure}} and the ::hXXXX hash suffix.
clean_path
Clean a source path to a workspace-relative form for display.
extract_frames
Extract FrameViews from a backtrace. Resolves a clone so an unresolved capture is symbolized only when formatted.
format_frame πŸ”’
hidden_marker πŸ”’
is_infra πŸ”’
is_infra_path
True if a path is error infrastructure, so a Location there (e.g. a From body) is not a meaningful raise site.
is_ours πŸ”’
render_callers πŸ”’
render_stack
Render one node’s raise line plus caller frames.