Module diagnostics

Source

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.
tracing
A scoped, structured logging and diagnostics system.

Structs§

ByteIndex
An index representing the offset in bytes from the start of a source file
ByteOffset
An offset in bytes relative to some ByteIndex
ColumnIndex
A zero-indexed column number
DefaultSourceManager
FileLineCol
A FileLineCol represents traditional file/line/column information for use in rendering.
Label
Represents a diagnostic label.
LabeledSpan
A labeled SourceSpan.
LineIndex
A zero-indexed line number
Location
A Location represents file and span information for portability across source managers
NamedSource
Utility struct for when you have a regular SourceCode type that doesn’t implement name. For example String. Or if you want to override the name returned by the SourceCode.
RelatedError
This type allows rolling up a diagnostic into a parent error
RelatedLabel
This type is used to associate a more complex label or set of labels with some other error.
Report
Core Diagnostic wrapper type.
SourceContent
Represents key information about a source file and its content:
SourceFile
A SourceFile represents a single file stored in a super::SourceManager
SourceFileRef
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.
SourceId
A SourceId represents the index/identifier associated with a unique source file in a SourceManager implementation.
SourceSpan
This represents a span of bytes in a Miden Assembly source file.
Span
This type is used to wrap any T with 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
Diagnostic severity. Intended to be used by ReportHandlers to change the way different Diagnostics are displayed. Defaults to Severity::Error.

Traits§

Diagnostic
Adds rich metadata to your Error that can be used by Report to print really nice and human-friendly error messages.
IntoDiagnostic
Convenience trait that adds a .into_diagnostic() method that converts a type implementing std::error::Error to a Result<T, Report>.
SourceCode
Represents readable source code of some sort.
SourceManager
SourceManagerExt
Spanned
This trait should be implemented for any type that has an associated SourceSpan.
WrapErr
Provides the wrap_err() method for Result.

Type Aliases§

Result
type alias for Result<T, Report>

Derive Macros§

Diagnostic