toobad 0.1.0

A simple, intuitive error handling library
Documentation
//! Error handling library with context attachment and ergonomic macros.
//!
//! This library provides a unified error type that wraps any `Error + Send + Sync`,
//! a trait for attaching context messages to failures, and macros for convenient
//! error creation and early return.
//!
//! # Key Types
//!
//! - [`Error`] - Main error type that wraps dynamic errors.
//! - [`Context`] - Trait for adding context to errors.
//! - [`Result`] - Type alias for `Result<T, Error>`.
//!
//! # Macros
//!
//! - [`toobad!`] - Create an error from a formatted message.
//! - [`bail!`] - Return an error early from a function.
//! - [`ensure!`] - Conditionally bail if a condition is false.

mod context;
mod error;
mod macros;

pub use context::Context;
pub use error::Error;

pub type Result<T> = std::result::Result<T, Error>;