From 0f7b2a50b05f38d886234ff6b031766c7af1dabb Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Thu, 18 Jun 2026 22:48:16 +0800 Subject: Add `pack_err!` macro for error structs with automatic name field --- mingling/src/lib.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'mingling/src/lib.rs') diff --git a/mingling/src/lib.rs b/mingling/src/lib.rs index 7b96d34..f1232d3 100644 --- a/mingling/src/lib.rs +++ b/mingling/src/lib.rs @@ -99,6 +99,9 @@ pub mod macros { pub use mingling_macros::node; /// Used to create a wrapper type for use with `Chain` and `Renderer` pub use mingling_macros::pack; + /// Used to create an error struct with automatic `name` field + #[cfg(feature = "extra_macros")] + pub use mingling_macros::pack_err; #[cfg(feature = "comp")] /// Internal macro for '`gen_program`' used to finally generate the completion structure pub use mingling_macros::program_comp_gen; @@ -192,6 +195,9 @@ pub mod prelude { pub use crate::macros::gen_program; /// Re-export of the `pack` macro for creating wrapper types. pub use crate::macros::pack; + /// Re-export of the `pack_err` macro for creating error types. + #[cfg(feature = "extra_macros")] + pub use crate::macros::pack_err; /// Re-export of the `r_print` macro for printing within a renderer context. pub use crate::macros::r_print; /// Re-export of the `r_println` macro for printing with a newline within a renderer -- cgit