From 7b901b44cab92b15a673a801de6785c309b73ddd Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Mon, 17 Aug 2026 04:33:54 +0800 Subject: feat(macros): add Wrap derive macro Add `#[derive(Wrap)]` to treat a struct as its inner type, generating `From`, `Deref`, and `DerefMut` implementations. Supports single-field structs or multi-field structs with a `#[wrap]`-marked field. --- mingling/src/lib.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'mingling/src') diff --git a/mingling/src/lib.rs b/mingling/src/lib.rs index 2596a9c..6a7074b 100644 --- a/mingling/src/lib.rs +++ b/mingling/src/lib.rs @@ -132,6 +132,9 @@ pub mod macros { pub use mingling_macros::suggest_enum; } +#[cfg(feature = "macros")] +pub use mingling_macros::Wrap; + #[cfg(feature = "macros")] pub use mingling_macros::EnumTag; @@ -197,6 +200,8 @@ pub mod prelude { #[cfg(feature = "core")] pub use crate::Routable; #[cfg(feature = "macros")] + pub use crate::Wrap; + #[cfg(feature = "macros")] pub use crate::macros::chain; #[cfg(all(feature = "extras", feature = "macros"))] pub use crate::macros::command; -- cgit