macro_rules! define_err_macro {
($macro_name:ident, $error:ty, $error_type:ty, $doc:expr) => { ... };
}Expand description
Internal helper macro that defines an error creation macro.
This avoids using the paste crate and keeps the implementation simple.
Each error module should use this to define their own specialized macro.
§Examples
ⓘ
// In models/src/error.rs:
define_err_macro!(
model_err,
ModelError,
ModelErrorType,
"Create a ModelError."
);