macro_rules! def_anyhow_variant { ( $(#[$attr:meta])* $vis:vis $name:ident, $enum_name:ident $variant_name:ident $(, $from:ty => $context:tt)* $(,)? ) => { ... }; }
Expand description
Define a newtype + it’s variant in the specified type. This is useful when you want to define a new error type, but also want to define a variant for it in another enum.