aboutsummaryrefslogtreecommitdiff
path: root/mingling/src/lib.rs
diff options
context:
space:
mode:
author魏曹先生 <1992414357@qq.com>2026-08-17 04:33:54 +0800
committer魏曹先生 <1992414357@qq.com>2026-08-17 04:33:54 +0800
commit7b901b44cab92b15a673a801de6785c309b73ddd (patch)
treefce888b65fc8283107bcba4325e7ca1ef443f4e6 /mingling/src/lib.rs
parentaa251efb87b561f62266628f06ad341253fbbdc5 (diff)
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.
Diffstat (limited to 'mingling/src/lib.rs')
-rw-r--r--mingling/src/lib.rs5
1 files changed, 5 insertions, 0 deletions
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
@@ -133,6 +133,9 @@ pub mod macros {
}
#[cfg(feature = "macros")]
+pub use mingling_macros::Wrap;
+
+#[cfg(feature = "macros")]
pub use mingling_macros::EnumTag;
#[cfg(feature = "macros")]
@@ -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;