Skip to main content

Module diagnostics

Module diagnostics 

Source
Expand description

Shared miette configuration and NamedSource helpers.

Structs§

LabeledSpan
A labeled SourceSpan.
SourceSpan
Span within a SourceCode

Functions§

install_miette_handler
Install the miette panic hook and graphical report handler.
named_source_from_bytes
Build a NamedSource from a name and raw bytes.
named_source_from_str
Build a NamedSource from a name and a UTF-8 string slice.
pretty_json_for_display
Pretty-print body as JSON for display in a NamedSource.
span_at_line_column
Convert a 1-based (line, column) pair (as produced by serde_json::Error) into a SourceSpan pointing at that byte inside body.
span_for_quoted_literal
Find the span of a JSON quoted literal (key or string value) inside bytes.