diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-06-15 01:31:12 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-06-15 01:31:12 +0800 |
| commit | acd670b5b3480471824aecb28922f8912123802e (patch) | |
| tree | 31e4b55440d930f405647601589c9d5b79f8a1e6 /examples | |
| parent | a85a79b8365591fb600918b43eb4d3618a3cc3d4 (diff) | |
Update example descriptions with meaningful docs
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/example-argument-parse/page.toml | 2 | ||||
| -rw-r--r-- | examples/example-async-support/page.toml | 2 | ||||
| -rw-r--r-- | examples/example-basic/page.toml | 2 | ||||
| -rw-r--r-- | examples/example-clap-binding/page.toml | 2 | ||||
| -rw-r--r-- | examples/example-completion/page.toml | 2 | ||||
| -rw-r--r-- | examples/example-custom-pickable/page.toml | 2 | ||||
| -rw-r--r-- | examples/example-dispatch-tree/page.toml | 2 | ||||
| -rw-r--r-- | examples/example-enum-tag/page.toml | 2 | ||||
| -rw-r--r-- | examples/example-error-handling/page.toml | 2 | ||||
| -rw-r--r-- | examples/example-exitcode/page.toml | 2 | ||||
| -rw-r--r-- | examples/example-general-renderer/page.toml | 2 | ||||
| -rw-r--r-- | examples/example-help/page.toml | 2 | ||||
| -rw-r--r-- | examples/example-hook/page.toml | 2 | ||||
| -rw-r--r-- | examples/example-implicit-dispatcher/page.toml | 2 | ||||
| -rw-r--r-- | examples/example-lazy-resources/page.toml | 2 | ||||
| -rw-r--r-- | examples/example-panic-unwind/page.toml | 2 | ||||
| -rw-r--r-- | examples/example-repl-basic/page.toml | 2 | ||||
| -rw-r--r-- | examples/example-resources/page.toml | 2 | ||||
| -rw-r--r-- | examples/example-setup/page.toml | 2 | ||||
| -rw-r--r-- | examples/example-unit-test/page.toml | 2 |
20 files changed, 20 insertions, 20 deletions
diff --git a/examples/example-argument-parse/page.toml b/examples/example-argument-parse/page.toml index 1a85621..fc4d646 100644 --- a/examples/example-argument-parse/page.toml +++ b/examples/example-argument-parse/page.toml @@ -4,7 +4,7 @@ name = "Argument Parse" icon = "📋" category = "parsing" desc = """ -Example Argument Parse +Shows how to use Mingling's `parser` feature with a `Picker` to extract and validate typed arguments from the command line. """ tags = ["pick", "Pickable"] files = ["src/main.rs", "Cargo.toml"] diff --git a/examples/example-async-support/page.toml b/examples/example-async-support/page.toml index e193a2b..cfa0565 100644 --- a/examples/example-async-support/page.toml +++ b/examples/example-async-support/page.toml @@ -4,7 +4,7 @@ name = "Async Support" icon = "⚡" category = "runtime" desc = """ -Example Async Runtime Support +Shows how to drive an async runtime with Mingling using the `async` feature, enabling `async fn` in `#[chain]` with tokio. """ tags = ["async", "await", "#[chain]"] files = ["src/main.rs", "Cargo.toml"] diff --git a/examples/example-basic/page.toml b/examples/example-basic/page.toml index a9e1a15..0aa6e68 100644 --- a/examples/example-basic/page.toml +++ b/examples/example-basic/page.toml @@ -4,7 +4,7 @@ name = "Basic" icon = "🚀" category = "core" desc = """ -Example The Basic Usage of Mingling +Demonstrates the basic usage of Mingling with a simple `greet` subcommand that takes a name and prints a greeting. """ tags = ["dispatcher!", "#[chain]", "#[renderer]"] files = ["src/main.rs", "Cargo.toml"] diff --git a/examples/example-clap-binding/page.toml b/examples/example-clap-binding/page.toml index bd8a9eb..aa03d5f 100644 --- a/examples/example-clap-binding/page.toml +++ b/examples/example-clap-binding/page.toml @@ -4,7 +4,7 @@ name = "Clap Binding" icon = "🔗" category = "parsing" desc = """ -Example Clap Binding +Demonstrates how to bind a `clap::Parser` derive struct to Mingling using `#[dispatcher_clap]` for advanced argument parsing. """ tags = ["clap"] files = ["src/main.rs", "Cargo.toml"] diff --git a/examples/example-completion/page.toml b/examples/example-completion/page.toml index 029cfb5..adccd86 100644 --- a/examples/example-completion/page.toml +++ b/examples/example-completion/page.toml @@ -4,7 +4,7 @@ name = "Completion" icon = "🔄" category = "ux" desc = """ -Example Completion +Demonstrates how to implement dynamic shell completion with `#[completion]` and generate scripts for bash, zsh, fish, and pwsh. """ tags = ["comp"] files = ["src/main.rs", "build.rs", "Cargo.toml"] diff --git a/examples/example-custom-pickable/page.toml b/examples/example-custom-pickable/page.toml index 9b6cd05..1c3bfa0 100644 --- a/examples/example-custom-pickable/page.toml +++ b/examples/example-custom-pickable/page.toml @@ -4,7 +4,7 @@ name = "Custom Pickable" icon = "🎯" category = "parsing" desc = """ -Example Custom Pickable +Shows how to implement the `Pickable` trait on custom types for seamless extraction from CLI arguments via Picker. """ tags = ["Pickable", "custom"] files = ["src/main.rs", "Cargo.toml"] diff --git a/examples/example-dispatch-tree/page.toml b/examples/example-dispatch-tree/page.toml index 220ea16..d1fd425 100644 --- a/examples/example-dispatch-tree/page.toml +++ b/examples/example-dispatch-tree/page.toml @@ -4,7 +4,7 @@ name = "Dispatch Tree" icon = "🌳" category = "dispatch" desc = """ -Example Dispatch Tree +Introduces the `dispatch_tree` feature that converts the subcommand list into a compile-time prefix trie for O(n) command lookup. """ tags = ["dispatch_tree"] files = ["src/main.rs", "Cargo.toml"] diff --git a/examples/example-enum-tag/page.toml b/examples/example-enum-tag/page.toml index 01eb9b0..53170a9 100644 --- a/examples/example-enum-tag/page.toml +++ b/examples/example-enum-tag/page.toml @@ -4,7 +4,7 @@ name = "Enum Tag" icon = "🏷️" category = "parsing" desc = """ -Example Enum Tag +Shows how to derive `EnumTag` on enums for parsing variants from CLI strings with renames and descriptions. """ tags = ["enum_tag", "Pickable"] files = ["src/main.rs", "Cargo.toml"] diff --git a/examples/example-error-handling/page.toml b/examples/example-error-handling/page.toml index 7c07928..655bc2b 100644 --- a/examples/example-error-handling/page.toml +++ b/examples/example-error-handling/page.toml @@ -4,7 +4,7 @@ name = "Error Handling" icon = "⚠️" category = "runtime" desc = """ -Example Error Handling +Demonstrates how to define custom error types with `pack!` and route them to dedicated `#[renderer]` functions for user-friendly output. """ tags = ["Result"] files = ["src/main.rs", "Cargo.toml"] diff --git a/examples/example-exitcode/page.toml b/examples/example-exitcode/page.toml index f0be05c..96329ba 100644 --- a/examples/example-exitcode/page.toml +++ b/examples/example-exitcode/page.toml @@ -4,7 +4,7 @@ name = "Exitcode" icon = "🚪" category = "runtime" desc = """ -Example Error Handling +Shows how to set custom exit codes using `ExitCodeSetup` and the `finish` hook to signal success or failure to the shell. """ tags = ["ExitCode"] files = ["src/main.rs", "Cargo.toml"] diff --git a/examples/example-general-renderer/page.toml b/examples/example-general-renderer/page.toml index c07b26a..1d3e4b1 100644 --- a/examples/example-general-renderer/page.toml +++ b/examples/example-general-renderer/page.toml @@ -4,7 +4,7 @@ name = "General Renderer" icon = "📤" category = "output" desc = """ -Example General Renderer +Demonstrates how to render structured output in JSON or YAML using `GeneralRendererSetup` and the `general_renderer` feature. """ tags = ["general_renderer", "--json", "--yaml"] files = ["src/main.rs", "Cargo.toml"] diff --git a/examples/example-help/page.toml b/examples/example-help/page.toml index aa74e6e..94018c8 100644 --- a/examples/example-help/page.toml +++ b/examples/example-help/page.toml @@ -4,7 +4,7 @@ name = "Help" icon = "💡" category = "ux" desc = """ -Example Help +Shows how to use the `#[help]` attribute to provide custom per-command help text that activates when the user passes `--help`. """ tags = ["#[help]"] files = ["src/main.rs", "Cargo.toml"] diff --git a/examples/example-hook/page.toml b/examples/example-hook/page.toml index beca75a..f696dd1 100644 --- a/examples/example-hook/page.toml +++ b/examples/example-hook/page.toml @@ -4,7 +4,7 @@ name = "Hook" icon = "🪝" category = "runtime" desc = """ -Example Hook +Demonstrates how to use Mingling's `ProgramHook` system to observe and debug every stage of the execution pipeline. """ tags = ["ProgramHook"] files = ["src/main.rs", "Cargo.toml"] diff --git a/examples/example-implicit-dispatcher/page.toml b/examples/example-implicit-dispatcher/page.toml index 2812b79..4bea717 100644 --- a/examples/example-implicit-dispatcher/page.toml +++ b/examples/example-implicit-dispatcher/page.toml @@ -4,7 +4,7 @@ name = "Implicit Dispatcher" icon = "🫥" category = "dispatch" desc = """ -Example Implicit Dispatcher +Shows the abbreviated `dispatcher!("cmd.path")` syntax from `extra_macros` that auto-derives struct names from the command path. """ tags = ["implicit"] files = ["src/main.rs", "Cargo.toml"] diff --git a/examples/example-lazy-resources/page.toml b/examples/example-lazy-resources/page.toml index d2c740f..46d5080 100644 --- a/examples/example-lazy-resources/page.toml +++ b/examples/example-lazy-resources/page.toml @@ -4,7 +4,7 @@ name = "Lazy Resources" icon = "💤️" category = "advanced" desc = """ -Example Lazy Resources +Demonstrates how to use `LazyRes<T>` for lazily initialized resources that only allocate when first accessed. """ tags = ["LazyRes<Res>"] files = ["src/main.rs", "Cargo.toml"] diff --git a/examples/example-panic-unwind/page.toml b/examples/example-panic-unwind/page.toml index 8b9a7cd..2ca327d 100644 --- a/examples/example-panic-unwind/page.toml +++ b/examples/example-panic-unwind/page.toml @@ -4,7 +4,7 @@ name = "Panic Unwind" icon = "💥" category = "runtime" desc = """ -Example Panic Unwind +Shows how to catch panics during program execution and display friendly error messages instead of a raw panic trace. """ tags = ["panic_unwind"] files = ["src/main.rs", "Cargo.toml"] diff --git a/examples/example-repl-basic/page.toml b/examples/example-repl-basic/page.toml index 83d92c0..bfe5340 100644 --- a/examples/example-repl-basic/page.toml +++ b/examples/example-repl-basic/page.toml @@ -4,7 +4,7 @@ name = "REPL Basic" icon = "🔁" category = "repl" desc = """ -Example REPL Basic +Demonstrates how to build an interactive REPL shell with Mingling using `exec_repl()`, custom prompts, and built-in setups. """ tags = ["repl"] files = ["src/main.rs", "Cargo.toml"] diff --git a/examples/example-resources/page.toml b/examples/example-resources/page.toml index 0121f8a..d51f80c 100644 --- a/examples/example-resources/page.toml +++ b/examples/example-resources/page.toml @@ -4,7 +4,7 @@ name = "Resources" icon = "📦" category = "advanced" desc = """ -Example Resource Injection +Shows how to share global state across commands using `with_resource()` and inject `&T` or `&mut T` into chain and renderer functions. """ tags = ["Resources", "injection"] files = ["Cargo.toml", "src/main.rs", "src/lib.rs"] diff --git a/examples/example-setup/page.toml b/examples/example-setup/page.toml index c12443e..9c1fc97 100644 --- a/examples/example-setup/page.toml +++ b/examples/example-setup/page.toml @@ -4,7 +4,7 @@ name = "Setup" icon = "🏗️" category = "core" desc = """ -Example Setup +Demonstrates how to build a custom `ProgramSetup` with `#[program_setup]` for modular configuration of program behaviour. """ tags = ["#[setup]", "extra_macros"] files = ["src/main.rs", "Cargo.toml"] diff --git a/examples/example-unit-test/page.toml b/examples/example-unit-test/page.toml index 7356cc2..d778d49 100644 --- a/examples/example-unit-test/page.toml +++ b/examples/example-unit-test/page.toml @@ -4,7 +4,7 @@ name = "Unit Test" icon = "🧪" category = "testing" desc = """ -Example Unit Test +Shows how to write unit tests for Chain and Renderer functions using the `entry!` macro and assertion helpers. """ tags = ["testing", "extra_macros"] files = ["Cargo.toml", "src/main.rs"] |
