Expand description
ComposableError and error context structures Error types and utilities.
This module provides a set of types and utilities for handling errors in a structured and composable way.
§Examples
use error_rail::{ComposableError, ErrorContext};
let err = ComposableError::new("database connection failed")
.with_context(ErrorContext::tag("db"))
.set_code(500);
assert!(err.to_string().contains("database connection failed"));
assert_eq!(err.error_code(), Some(500));Re-exports§
pub use composable_error::ComposableError;pub use composable_error::FingerprintConfig;pub use alloc_type::*;pub use error_context::*;pub use error_pipeline::*;pub use lazy_context::*;
Modules§
- accumulator
- alloc_
type - composable_
error - Composable error type with structured context and error codes.
- error_
context - Rich, structured metadata for error contexts.
- error_
formatter - Error chain formatting utilities.
- error_
pipeline - lazy_
context - Deferred context generation for performance-critical paths.
- retry
Type Aliases§
- Boxed
Composable Error - Boxed
ComposableErrorfor reduced stack size. - Boxed
Composable Result - Result alias with boxed
ComposableErrorfor reduced stack size. - Boxed
Result - Shorter alias for
BoxedComposableResult. - Composable
Result - Result alias that wraps failures in
ComposableError. - Error
Vec - SmallVec-backed collection used for accumulating contexts/errors.