Expand description
Derive macro for the error2 crate.
This crate provides the #[derive(Error2)] procedural macro for automatically
implementing error types with backtrace support.
§Usage
use error2::prelude::*;
#[derive(Debug, Error2)]
pub enum MyError {
#[error2(display("IO error"))]
Io {
source: std::io::Error,
backtrace: Backtrace,
},
}See the main error2 crate documentation for complete usage information.
Derive Macros§
- Error2
- Derives the
Error2trait for an error type.