1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
//! Common error types for `ArcBox`.
//!
//! This crate provides unified error types that are shared across multiple `ArcBox` crates,
//! reducing code duplication and ensuring consistent error handling patterns.
//!
//! # Usage
//!
//! ```rust
//! use arcbox_error::CommonError;
//!
//! fn example() -> Result<(), CommonError> {
//! // Use CommonError for common error scenarios
//! Err(CommonError::NotFound("resource".to_string()))
//! }
//! ```
//!
//! # Crate-Specific Errors
//!
//! Each crate can define its own error type that wraps `CommonError`:
//!
//! ```rust,ignore
//! use arcbox_error::CommonError;
//! use thiserror::Error;
//!
//! #[derive(Debug, Error)]
//! pub enum MyError {
//! #[error(transparent)]
//! Common(#[from] CommonError),
//!
//! #[error("my specific error: {0}")]
//! Specific(String),
//! }
//! ```
pub use CommonError;
/// Result type alias using `CommonError`.
pub type Result<T> = Result;