aboutsummaryrefslogtreecommitdiff
path: root/docs/_zh_CN/pages/10-help.md
diff options
context:
space:
mode:
author魏曹先生 <1992414357@qq.com>2026-08-03 13:36:13 +0800
committer魏曹先生 <1992414357@qq.com>2026-08-03 13:36:13 +0800
commit9c8f5c8d60f3066fec8a1573aa3f5673e0b2ecb8 (patch)
tree99a5de6f698310215163ffd488de2354c4b7fb3e /docs/_zh_CN/pages/10-help.md
parent82372181d3b819ce57b04207f42406c188e42ac9 (diff)
chore!: rename ErrorDispatcherNotFound to EntryFallback
Rename the internal fallback type and its associated `ProgramCollect` plumbing from `ErrorDispatcherNotFound`/`build_dispatcher_not_found` to `EntryFallback`/`build_entry_fallback`, along with the generated enum variant and pack type. Update all documentation, examples, and tests accordingly.
Diffstat (limited to 'docs/_zh_CN/pages/10-help.md')
-rw-r--r--docs/_zh_CN/pages/10-help.md6
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/_zh_CN/pages/10-help.md b/docs/_zh_CN/pages/10-help.md
index 1c4e410..a399ae3 100644
--- a/docs/_zh_CN/pages/10-help.md
+++ b/docs/_zh_CN/pages/10-help.md
@@ -27,14 +27,14 @@ fn help_greet(_entry: EntryGreet) {
## 全局帮助
-你也可以为 `ErrorDispatcherNotFound` 写帮助,作为"根帮助":
+你也可以为 `EntryFallback` 写帮助,作为"根帮助":
```rust
@@@use mingling::macros::help;
@@@use mingling::macros::buffer;
// 用户直接输入 --help 时触发
#[help(buffer)]
-fn help_root(entry: ErrorDispatcherNotFound) {
+fn help_root(entry: EntryFallback) {
r_println!("Usage: my-cli <command>");
r_println!("Commands:");
r_println!(" greet Say hello");
@@ -42,7 +42,7 @@ fn help_root(entry: ErrorDispatcherNotFound) {
```
> [!TIP]
-> `ErrorDispatcherNotFound` 是 `gen_program!()` 自动生成的类型,代表"没有匹配到任何命令"的情况。为它写 `#[help]` 就是给程序的根命令加帮助。
+> `EntryFallback` 是 `gen_program!()` 自动生成的类型,代表"没有匹配到任何命令"的情况。为它写 `#[help]` 就是给程序的根命令加帮助。
## 需要 Setup 配合