Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

orion-error Documentation

简体中文

orion-error is the Rust implementation of the WuKong error governance model.

At the documentation entry point, the most important framing is this:

  • contract channel — stable identity, category, retryability, visibility
  • diagnostic channel — detail, source chain, operation context, key fields
  • adaptive output — HTTP / RPC / CLI / log projections generated by policy

In this crate, those ideas map to:

  • #[derive(OrionError)] for stable semantic identities
  • StructError<R> as the unified runtime carrier
  • source_err(...) for first entry and semantic-boundary wrapping
  • conv_err() for reason remapping without rebuilding the error story
  • report() / identity_snapshot() / exposure(...) for boundary output

Suggested reading order: start with the user guide to learn concepts and usage, then check the developer guide for public API contracts and release details.


User Guide

DocumentDescription
Why orion-errorError governance motivation and examples
TutorialGetting started tutorial
Protocol ContractExposure projection contract
Report / Exposure BoundaryDiagnostic vs exposure boundary
LoggingLogging integration
Comparison with thiserrorDifferences and coexistence
Ecosystem Comparisonanyhow / thiserror / color-eyre / orion-error
Large-Scale Error Governance ManifestoWuKong model, governance principles, and industrial validation
Design ConstraintsKnown design constraints

Developer Guide

DocumentDescription
API ContractPublic API boundaries
Compatibility MigrationMigration from older APIs
Public Surface GradingLayered export grading
Release ChecklistPre-release checks
Performance BenchmarksAllocation benchmarks

When docs and implementation conflict, src/, tests/, examples/ are authoritative.