Skip to main content

Module diagnostics

Module diagnostics 

Source
Expand description

The codes this crate emits, and the registry gates over them.

The record, the code grammar, the severity ladder, and the stage family live in powerio-core. What lives here is the transmission side registry: one DiagnosticInfo per code, declared once, so an emission site names an entry rather than a loose string and every emitted code is registered by construction.

Codes are families, not one per site: what differs between two sites of a family is which field or record it was, which belongs in details where a consumer can read it, rather than in a code nobody can enumerate.

Modules§

codes
One EmitFamily per write target, plus the codes a single reader or a single writer owns.

Structs§

Diagnostic
One coded user facing finding.
DiagnosticCode
Stable dotted identity of one diagnostic.
DiagnosticInfo
One entry in a crate’s diagnostic registry.
EmitFamily
The write side family every target shares.

Enums§

DiagnosticSeverity
Severity of one user facing finding.
DiagnosticStage
Pipeline stage encoded by the first segment of a diagnostic code.
ErrorCategory
Coarse projection of an operation failure for bindings and exit statuses.

Functions§

check_registry
Check grammar, namespace, uniqueness, summaries, and fatal category data.
code_is_well_formed
Check [A-Z][A-Z0-9_]*(\.[A-Z0-9_]+){2,}.
registry
Every code this crate declares.
render_diagnostic
render_diagnostics