Skip to main content

Module diagnostics

Module diagnostics 

Source

Modules§

advice
chiplets
crypto
deferred
Content-addressed deferred computation for VM hints.
events
field
mast
MAST forest: a collection of procedures represented as Merkle trees.
miette
You run miette? You run her code like the software? Oh. Oh! Error code for coder! Error code for One Thousand Lines!
operations
prettier
program
proof
reporting
Rendering and error reporting implementation details.
serde
serde_spanned
A serde-compatible spanned Value
utils

Structs§

AdHocDiagnostic
Diagnostic that can be created at runtime.
ByteIndex
An index representing the offset in bytes from the start of a source file
ByteOffset
An offset in bytes relative to some ByteIndex
CaptureEmitter
CaptureEmitter is used to capture diagnostics which are emitted, for later examination.
ColumnIndex
A zero-indexed column number
ColumnNumber
A one-indexed column number
DefaultEmitter
DefaultEmitter is used for rendering to stderr, and as is implied by the name, is the default emitter implementation.
DefaultSourceManager
DiagnosticError
Convenience super::Diagnostic that can be used as an “anonymous” wrapper for errors. This is intended to be paired with IntoDiagnostic.
DiagnosticsConfig
DiagnosticsHandler
Felt
A Felt backed by Plonky3’s Goldilocks field element.
FileLineCol
A FileLineCol represents traditional file/line/column information for use in rendering.
InFlightDiagnosticBuilder
Constructs an in-flight diagnostic using the builder pattern
Label
Represents a diagnostic label.
LabeledSpan
A labeled SourceSpan.
LineIndex
A zero-indexed line number
LineNumber
A one-indexed line number
Location
A Location represents file and span information for portability across source managers
NullEmitter
NullEmitter is used to silence diagnostics entirely, without changing anything in the diagnostic infrastructure.
Position
Position in a text document expressed as zero-based line and character offset.
PrintDiagnostic
A type that can be used to render a super::Diagnostic via core::fmt::Display
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.
Selection
A range in a text document expressed as (zero-based) start and end positions.
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.
Uri
A URI reference that specifies the location of a source file, whether on disk, on the network, or elsewhere.
Word
A unit of data consisting of 4 field elements.

Enums§

Severity
Diagnostic severity. Intended to be used by ReportHandlers to change the way different Diagnostics are displayed. Defaults to Severity::Error.
SourceContentUpdateError
SourceLanguage
SourceManagerError
The set of errors which may be raised by a SourceManager

Constants§

EMPTY_WORD
Array of field elements representing word of ZEROs in the Miden base field.
FMP_ADDR
The address where the frame pointer is stored in memory.
FMP_INIT_VALUE
The initial value for the frame pointer, corresponding to the start address for procedure locals.
ONE
Field element representing ONE in the Miden base field.
WORD_SIZE
The number of field elements in a Miden word.
ZERO
Field element representing ZERO in the Miden base field.

Traits§

Diagnostic
Adds rich metadata to your Error that can be used by Report to print really nice and human-friendly error messages.
Emitter
The Emitter trait is used for controlling how diagnostics are displayed.
IntoDiagnostic
Convenience trait for converting a type implementing core::error::Error into a Report.
SourceManager
SourceManagerExt
SourceManagerSync
SourceManagerSync is a marker trait for SourceManager implementations that are also Send + Sync, and is automatically implemented for any SourceManager that meets those requirements.
Spanned
This trait should be implemented for any type that has an associated SourceSpan.
WrapErr
Provides the wrap_err() method for Result.

Type Aliases§

ReportHandlerOpts

Derive Macros§

Diagnostic
Spanned