Expand description
Error types and error handling strategy for Asupersync.
This module defines the core error types used throughout the runtime. Error handling follows these principles:
- Errors are explicit and typed (no stringly-typed errors)
- Errors compose well with the Outcome severity lattice
- Panics are isolated and converted to
Outcome::Panicked - Errors are classified by recoverability for retry logic
§Error Categories
Errors are organized into categories:
- Cancellation: Operation cancelled by request or timeout
- Budgets: Resource limits exceeded (deadlines, quotas)
- Channels: Communication primitive errors
- Obligations: Linear resource tracking violations
- Regions: Ownership and lifecycle errors
- Encoding: RaptorQ encoding pipeline errors
- Decoding: RaptorQ decoding pipeline errors
- Transport: Symbol routing and transmission errors
- Distributed: Distributed region coordination errors
- Internal: Runtime bugs and invalid states
§Recovery Classification
All errors can be classified by Recoverability:
Transient: Temporary failure, safe to retryPermanent: Unrecoverable, do not retryUnknown: Recoverability depends on context
Modules§
- recovery
- Recovery strategies for handling transient errors.
Structs§
- Backoff
Hint - Hints for configuring exponential backoff.
- Cancelled
- Marker type for cancellation, carrying a reason.
- Error
- The main error type for Asupersync operations.
- Error
Context - Diagnostic context for an error.
Enums§
- Acquire
Error - Error when acquiring a semaphore-like permit.
- Error
Category - High-level error category for grouping related errors.
- Error
Kind - The kind of error.
- Recoverability
- Classification of error recoverability for retry logic.
- Recovery
Action - Recommended recovery action for an error.
- Recv
Error - Error when receiving from a channel.
- Send
Error - Error when sending on a channel.
Traits§
- Result
Ext - Extension trait for adding context to Results.
Type Aliases§
- Result
- A specialized Result type for Asupersync operations.