From c23c590330af83afb6e146bcd9b0a274b3689d22 Mon Sep 17 00:00:00 2001
From: 魏曹先生 <1992414357@qq.com>
Date: Mon, 17 Aug 2026 03:27:46 +0800
Subject: refactor!: remove Node type and simplify dispatcher macro syntax
The `dispatcher!` macro no longer requires a `CMD*` dispatcher type
argument; the dispatcher struct is now generated internally as
`__Dispatcher{Pascal}`. The `Node` type, `node!` macro, and
`Dispatcher::node()` / `clone_dispatcher()` methods are removed.
---
docs/pages/3-define-a-chain.md | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
(limited to 'docs/pages/3-define-a-chain.md')
diff --git a/docs/pages/3-define-a-chain.md b/docs/pages/3-define-a-chain.md
index 1134dbf..dca299e 100644
--- a/docs/pages/3-define-a-chain.md
+++ b/docs/pages/3-define-a-chain.md
@@ -3,7 +3,7 @@
Use the chain macro to declare a chain and handle Entry input
-In the previous section, we declared `dispatcher!("greet", CMDGreet => EntryGreet)`.
+In the previous section, we declared `dispatcher!("greet", EntryGreet)`.
Now when a user types `greet`, it gets matched and wrapped into `EntryGreet`.
@@ -16,7 +16,7 @@ We need a Chain to process it.
`#[chain]` marks a handler function. The format is straightforward:
```rust
-@@@dispatcher!("greet", CMDGreet => EntryGreet);
+@@@dispatcher!("greet", EntryGreet);
pack!(ResultName = String);
#[chain]
@@ -77,7 +77,7 @@ See [Naming Convention](pages/other/naming_rule) for details, but for now just r
`EntryGreet`'s `inner` is a `Vec`, which you can freely process inside a Chain:
```rust
-@@@dispatcher!("greet", CMDGreet => EntryGreet);
+@@@dispatcher!("greet", EntryGreet);
@@@pack!(ResultName = String);
#[chain]
fn handle_greet(args: EntryGreet) -> Next {
@@ -100,7 +100,7 @@ Now let's connect the Dispatcher and Chain:
```rust
// 1. Declare the command
-dispatcher!("greet", CMDGreet => EntryGreet);
+dispatcher!("greet", EntryGreet);
// 2. Declare the pipeline data type
pack!(ResultName = String);
--
cgit