Expand description
Derive macro for NexVigilant error types.
Drop-in replacement for thiserror::Error. Provides #[derive(Error)]
with #[error("...")], #[from], and #[source] attributes.
§Usage
use nexcore_error_derive::Error;
#[derive(Debug, Error)]
pub enum MyError {
#[error("IO error: {0}")]
Io(#[from] std::io::Error),
#[error("parse error: {msg}")]
Parse { msg: String },
#[error("not found")]
NotFound,
}Derive Macros§
- Error
- Derive
Displayandstd::error::Errorfor an enum or struct.