diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-03-31 16:57:58 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-03-31 16:57:58 +0800 |
| commit | 3572008321bff319d5ab226d0b9979fa89af498e (patch) | |
| tree | 608cde826953aae5a600b2aa449e4290ad694ae9 /mingling_macros/src/lib.rs | |
| parent | a1503fef9947732994d4fb866b90b665c846b547 (diff) | |
Rename chain_struct macro to pack
Diffstat (limited to 'mingling_macros/src/lib.rs')
| -rw-r--r-- | mingling_macros/src/lib.rs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/mingling_macros/src/lib.rs b/mingling_macros/src/lib.rs index 13d5ddc..b0ed658 100644 --- a/mingling_macros/src/lib.rs +++ b/mingling_macros/src/lib.rs @@ -9,9 +9,9 @@ use quote::quote; use syn::parse_macro_input; mod chain; -mod chain_struct; mod dispatcher_chain; mod node; +mod pack; mod render; mod renderer; @@ -58,10 +58,10 @@ pub fn node(input: TokenStream) -> TokenStream { /// # Examples /// /// ```ignore -/// use mingling_macros::chain_struct; +/// use mingling_macros::pack; /// /// // Creates a wrapper type around String -/// chain_struct!(NameString = String); +/// pack!(NameString = String); /// /// // Usage: /// let name = NameString::new("Hello".to_string()); @@ -71,8 +71,8 @@ pub fn node(input: TokenStream) -> TokenStream { /// let chain_process = name2.to_chain(); // Convert to ChainProcess /// ``` #[proc_macro] -pub fn chain_struct(input: TokenStream) -> TokenStream { - chain_struct::chain_struct(input) +pub fn pack(input: TokenStream) -> TokenStream { + pack::pack(input) } /// Creates a dispatcher chain for command execution. @@ -83,11 +83,11 @@ pub fn chain_struct(input: TokenStream) -> TokenStream { /// /// # Syntax /// -/// `dispatcher!("command_name", CommandStruct => ChainStruct)` +/// `dispatcher!("command_name", CommandStruct => Packed)` /// /// - `command_name`: A string literal representing the command name /// - `CommandStruct`: The name of the dispatcher struct to generate -/// - `ChainStruct`: The name of the chain wrapper struct to generate +/// - `Packed`: The name of the chain wrapper struct to generate /// /// # Examples /// @@ -115,11 +115,11 @@ pub fn dispatcher(input: TokenStream) -> TokenStream { /// /// # Syntax /// -/// `dispatcher_render!("command_name", CommandStruct => ChainStruct)` +/// `dispatcher_render!("command_name", CommandStruct => Packed)` /// /// - `command_name`: A string literal representing the command name /// - `CommandStruct`: The name of the dispatcher struct to generate -/// - `ChainStruct`: The name of the chain wrapper struct to generate +/// - `Packed`: The name of the chain wrapper struct to generate /// /// # Examples /// |
