covalence_lib_error/lib.rs
1//! Error handling tools shared by Covalence crates.
2//!
3//! An internal facade (a crate that re-exports other crates) for Covalence's
4//! own crates. Its API may change without notice.
5//!
6//! - [`snafu`]: concrete, matchable library errors, defined in the crate that
7//! owns the operation.
8//! - [`miette`]: diagnostics at user-facing boundaries. Native applications may
9//! enable `fancy` for terminal rendering.
10//! - Derive through the re-exported crate roots. For SNAFU, set
11//! `#[snafu(crate_root(covalence_lib_error::snafu))]` in downstream crates.
12//! - This crate does not define a universal domain error type.
13#![deny(missing_docs)]
14
15pub use miette;
16pub use snafu;
17
18/// A boxed, thread-safe error for sources whose concrete type is not exposed.
19pub type BoxError = Box<dyn std::error::Error + Send + Sync + 'static>;