Modules§
- This module provides a trait for creating custom syntax highlighters that highlight
Diagnosticsource code with ANSI escape sequences when rendering with theGraphicalReportHighlighter.
Macros§
- Return early with an error.
- Construct a
MietteDiagnosticin more user-friendly way. - Return early with an error if a condition is not satisfied.
- Construct an ad-hoc
Report.
Structs§
ReportHandlerthat renders plain text and avoids extraneous graphics. It’s optimized for screen readers and braille users, but is also used in any non-graphical environments, such as non-TTY output.- Core Diagnostic wrapper type.
- Core Diagnostic wrapper type.
- A
ReportHandlerthat displays a givenReportin a quasi-graphical way, using terminal colors, unicode drawing characters, and other such things. - Theme used by
GraphicalReportHandlerto render fancyDiagnosticreports. - Error indicating that
set_hook()was unable to install the providedErrorHook. ReportHandlerthat renders JSON output. It’s a machine-readable output.- A labeled
SourceSpan. - Diagnostic that can be created at runtime.
- A
ReportHandlerthat displays a givenReportin a quasi-graphical way, using terminal colors, unicode drawing characters, and other such things. - Create a custom
MietteHandlerfrom options. - Basic implementation of the
SpanContentstrait, for convenience. - Utility struct for when you have a regular
SourceCodetype that doesn’t implementname. For exampleString. Or if you want to override thenamereturned by theSourceCode. ReportHandlerthat renders plain text and avoids extraneous graphics. It’s optimized for screen readers and braille users, but is also used in any non-graphical environments, such as non-TTY output.- Core Diagnostic wrapper type.
- Newtype that represents the
ByteOffsetfrom the beginning of aSourceCode - Span within a
SourceCode - Characters to be used when drawing when using
GraphicalReportHandler. - Styles for various parts of graphical rendering for the
GraphicalReportHandler.
Enums§
- Error enum for miette. Used by certain operations in the protocol.
- Settings to control the color format used for graphical rendering.
Diagnosticseverity. Intended to be used byReportHandlers to change the way differentDiagnostics are displayed. Defaults toSeverity::Error.
Traits§
- Provides the
wrap_err()method forResult. - Adds rich metadata to your Error that can be used by
Reportto print really nice and human-friendly error messages. - Error Report Handler trait for customizing
miette::Report - Convenience trait that adds a
.into_diagnostic()method that converts a type implementingstd::error::Errorto aResult<T, Report>. - Error Report Handler trait for customizing
miette::Report - Represents readable source code of some sort.
- Contents of a
SourceCodecovered bySourceSpan. - Provides the
wrap_err()method forResult.
Functions§
- Set the error hook.
- Tells miette to render panics using its rendering engine.
Type Aliases§
- “Raw” type for the byte offset from the beginning of a
SourceCode. - type alias for
Result<T, Report>