Module types

Module types 

Source
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§

BoxedComposableError
Boxed ComposableError for reduced stack size.
BoxedComposableResult
Result alias with boxed ComposableError for reduced stack size.
BoxedResult
Shorter alias for BoxedComposableResult.
ComposableResult
Result alias that wraps failures in ComposableError.
ErrorVec
SmallVec-backed collection used for accumulating contexts/errors.