aboutsummaryrefslogtreecommitdiff
path: root/docs/pages/3-define-a-chain.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/pages/3-define-a-chain.md')
-rw-r--r--docs/pages/3-define-a-chain.md8
1 files changed, 4 insertions, 4 deletions
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 <code>chain</code> macro to declare a chain and handle Entry input
</p>
-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<String>`, 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);