Modules§
- miette
- You run miette? You run her code like the software? Oh. Oh! Error code for coder! Error code for One Thousand Lines!
- reporting
- Rendering and error reporting implementation details.
Structs§
- AdHoc
Diagnostic - Diagnostic that can be created at runtime.
- Byte
Index - An index representing the offset in bytes from the start of a source file
- Byte
Offset - An offset in bytes relative to some ByteIndex
- Capture
Emitter - CaptureEmitter is used to capture diagnostics which are emitted, for later examination.
- Column
Index - A zero-indexed column number
- Default
Emitter - DefaultEmitter is used for rendering to stderr, and as is implied by the name, is the default emitter implementation.
- Default
Source Manager - Diagnostic
Error - Convenience [
Diagnostic] that can be used as an “anonymous” wrapper for Errors. This is intended to be paired withIntoDiagnostic. - Diagnostics
Config - Diagnostics
Handler - File
Line Col - A FileLineCol represents traditional file/line/column information for use in rendering.
- InFlight
Diagnostic Builder - Constructs an in-flight diagnostic using the builder pattern
- Label
- Represents a diagnostic label.
- Labeled
Span - A labeled
SourceSpan. - Line
Index - A zero-indexed line number
- Location
- A Location represents file and span information for portability across source managers
- Null
Emitter - NullEmitter is used to silence diagnostics entirely, without changing anything in the diagnostic infrastructure.
- Print
Diagnostic - A type that can be used to render a super::Diagnostic via core::fmt::Display
- Related
Error - This type allows rolling up a diagnostic into a parent error
- Related
Label - This type is used to associate a more complex label or set of labels with some other error.
- Report
- Core Diagnostic wrapper type.
- Source
Content - Represents key information about a source file and its content:
- Source
File - A SourceFile represents a single file stored in a super::SourceManager
- Source
File Ref - A reference to a specific spanned region of a SourceFile, that provides access to the actual SourceFile, but scoped to the span it was created with.
- Source
Id - A SourceId represents the index/identifier associated with a unique source file in a SourceManager implementation.
- Source
Span - This represents a span of bytes in a Miden Assembly source file.
- Span
- This type is used to wrap any
Twith a SourceSpan, and is typically used when it is not convenient to add a SourceSpan to the type - most commonly because we don’t control the type.
Enums§
- Severity
Diagnosticseverity. Intended to be used byReportHandlers to change the way differentDiagnostics are displayed. Defaults toSeverity::Error.
Traits§
- Diagnostic
- Adds rich metadata to your Error that can be used by
Reportto print really nice and human-friendly error messages. - Emitter
- The Emitter trait is used for controlling how diagnostics are displayed.
- Into
Diagnostic - Convenience trait that adds a
.into_diagnostic()method that converts a type implementingstd::error::Errorto aResult<T, Report>. - Source
Manager - Source
Manager Ext - Spanned
- This trait should be implemented for any type that has an associated SourceSpan.
- WrapErr
- Provides the
wrap_err()method forResult.