docs.rs failed to build error-forge-0.6.1
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build:
error-forge-0.9.6
Error Forge
Error Forge is a comprehensive, zero-dependency error management framework for Rust applications. It simplifies error handling through expressive macros, automatic trait implementations, and extensible error hooks for seamless integration with external logging systems.
Features
- Rich Error Types: Define expressive error types with minimal boilerplate
- ForgeError Trait: Unified interface for all error types with contextual metadata
- Declarative Macros: Generate complete error enums with the
define_errors!
macro - Error Composition: Combine errors from multiple modules with the
group!
macro - Derive Macros: Quickly implement errors with
#[derive(ModError)]
- Console Formatting: ANSI color formatting for terminal output with
ConsoleTheme
- Error Hooks: Register callbacks for errors with severity level support
- Zero External Dependencies: Completely standalone with no third-party dependencies
Installation
Add the following to your Cargo.toml
file:
[]
= "0.6.1"
Usage
Basic Error Definition
use define_errors;
define_errors!
// The macro automatically implements constructors and the ForgeError trait
Error Composition with the group!
Macro
use ;
define_errors!
define_errors!
// Combine errors from different modules into a single error type
group!
Using Derive Macro
use ModError;
Error Hooks for Logging Integration
use ;
Console Formatting
use ;
Advanced Usage
For more detailed documentation and advanced usage examples, refer to the API Documentation.