diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-03-29 00:52:16 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-03-29 00:52:28 +0800 |
| commit | db9afa0b06355028eafe3bc29fe0b2429ba8fd0a (patch) | |
| tree | 60bf74d0853fcc0c1e9363813c26109a6ca38a4f /mingling_macros/src/chain_struct.rs | |
| parent | 7ce68cd11516bd7cf037ecea99a92aee7c31b2c3 (diff) | |
Completed the first preliminary usable version of the Mingling
framework.
Diffstat (limited to 'mingling_macros/src/chain_struct.rs')
| -rw-r--r-- | mingling_macros/src/chain_struct.rs | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/mingling_macros/src/chain_struct.rs b/mingling_macros/src/chain_struct.rs index 82a596d..7305a67 100644 --- a/mingling_macros/src/chain_struct.rs +++ b/mingling_macros/src/chain_struct.rs @@ -27,29 +27,6 @@ impl Parse for ChainStructInput { } } -/// Implementation of the `chain_struct!` macro -/// -/// This macro creates a wrapper struct with automatic implementations of: -/// - `From<InnerType>` and `Into<InnerType>` -/// - `new()` constructor -/// - `Default` (if the inner type implements Default) -/// - `AsRef<InnerType>` and `AsMut<InnerType>` -/// - `Deref` and `DerefMut` to the inner type -/// -/// # Examples -/// -/// ```ignore -/// use mingling_macros::chain_struct; -/// -/// // Creates a wrapper type around String -/// chain_struct!(NameString = String); -/// -/// // Usage: -/// let name = NameString::new("Hello".to_string()); -/// let inner: String = name.into(); // Into conversion -/// let name2 = NameString::from("World".to_string()); // From conversion -/// let ref_str: &String = name2.as_ref(); // AsRef -/// ``` pub fn chain_struct(input: TokenStream) -> TokenStream { let ChainStructInput { type_name, |
