From 9c8f5c8d60f3066fec8a1573aa3f5673e0b2ecb8 Mon Sep 17 00:00:00 2001
From: 魏曹先生 <1992414357@qq.com>
Date: Mon, 3 Aug 2026 13:36:13 +0800
Subject: 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.
---
docs/pages/concepts/1-the-pipeline.md | 4 ++--
docs/pages/concepts/4-program-collect.md | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
(limited to 'docs/pages/concepts')
diff --git a/docs/pages/concepts/1-the-pipeline.md b/docs/pages/concepts/1-the-pipeline.md
index e73379d..2ee26d0 100644
--- a/docs/pages/concepts/1-the-pipeline.md
+++ b/docs/pages/concepts/1-the-pipeline.md
@@ -42,12 +42,12 @@ The matching rule is **prefix matching** on space-separated tokens — the longe
graph LR
Input["user input"] --> M{"match Dispatcher"}
M -->|"matched"| E["call dispatcher.begin(args)
return wrapped Entry"]
- M -->|"no match"| NF["build_dispatcher_not_found
generate ErrorDispatcherNotFound"]
+ M -->|"no match"| NF["build_entry_fallback
generate EntryFallback"]
```
On a match, `dispatcher.begin(args)` is called, returning `ChainProcess::Ok((AnyOutput, _))` — the Entry type wrapping the user's input params.
-If no Dispatcher matches, `ErrorDispatcherNotFound` is generated (wrapping the full input), which a Renderer can later handle to display "Command not found".
+If no Dispatcher matches, `EntryFallback` is generated (wrapping the full input), which a Renderer can later handle to display "Command not found".
### 2. Help Shortcut
diff --git a/docs/pages/concepts/4-program-collect.md b/docs/pages/concepts/4-program-collect.md
index a24f115..c5203c3 100644
--- a/docs/pages/concepts/4-program-collect.md
+++ b/docs/pages/concepts/4-program-collect.md
@@ -21,7 +21,7 @@ This enum is the type of `G` in `AnyOutput` — the scheduler uses enum varia
- **`render`** — calls the corresponding `#[renderer]` function by `member_id`, writes to `RenderResult`
- **`render_help`** — calls the corresponding `#[help]` function by `member_id`
- **`has_chain` / `has_renderer`** — checks whether a variant has a corresponding handler
-- **`build_dispatcher_not_found` / `build_renderer_not_found` / `build_empty_result`** — three built-in fallback types for edge cases
+- **`build_entry_fallback` / `build_renderer_not_found` / `build_empty_result`** — three built-in fallback types for edge cases
This mapping is resolved at runtime via enum matching — only the enum and match branches are generated at compile time; actual function calls happen at runtime.
--
cgit