diff options
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/_zh_CN/pages/1-getting-started.md | 2 | ||||
| -rw-r--r-- | docs/_zh_CN/pages/14-testing.md | 4 | ||||
| -rw-r--r-- | docs/_zh_CN/pages/2-define-a-dispatcher.md | 4 | ||||
| -rw-r--r-- | docs/_zh_CN/pages/6-argument-parse-picker.md | 10 | ||||
| -rw-r--r-- | docs/_zh_CN/pages/8-setup-and-resources.md | 6 | ||||
| -rw-r--r-- | docs/_zh_CN/pages/9-error-handling.md | 4 | ||||
| -rw-r--r-- | docs/_zh_CN/pages/other/features.md | 72 | ||||
| -rw-r--r-- | docs/dev/pages/issues/_the-mod-pathfinder.md | 2 | ||||
| -rw-r--r-- | docs/dev/pages/issues/the-command-macro.md | 6 | ||||
| -rw-r--r-- | docs/example-pages/examples.json | 12 | ||||
| -rw-r--r-- | docs/pages/1-getting-started.md | 2 | ||||
| -rw-r--r-- | docs/pages/14-testing.md | 4 | ||||
| -rw-r--r-- | docs/pages/2-define-a-dispatcher.md | 4 | ||||
| -rw-r--r-- | docs/pages/6-argument-parse-picker.md | 10 | ||||
| -rw-r--r-- | docs/pages/8-setup-and-resources.md | 6 | ||||
| -rw-r--r-- | docs/pages/9-error-handling.md | 4 | ||||
| -rw-r--r-- | docs/pages/other/features.md | 73 |
17 files changed, 173 insertions, 52 deletions
diff --git a/docs/_zh_CN/pages/1-getting-started.md b/docs/_zh_CN/pages/1-getting-started.md index 84870b2..2fca931 100644 --- a/docs/_zh_CN/pages/1-getting-started.md +++ b/docs/_zh_CN/pages/1-getting-started.md @@ -19,7 +19,7 @@ features = [] ## 启用特性 -**Mingling** 默认所有特性关闭,且不提供类似 `full` 的全开特性。 +**Mingling** 默认只启用 `core` 和 `macros`,其余部分需要按需启用 因为部分特性会 **直接影响整个生命周期的行为**,需要你按需启用,例如: diff --git a/docs/_zh_CN/pages/14-testing.md b/docs/_zh_CN/pages/14-testing.md index 031be59..3567aef 100644 --- a/docs/_zh_CN/pages/14-testing.md +++ b/docs/_zh_CN/pages/14-testing.md @@ -70,10 +70,10 @@ fn test_handle_hello_with_name() { ## 用 entry! 宏构造数据 -如果启用了 `extra_macros`,可以用 `entry!` 快速构造 Entry: +如果启用了 `extras`,可以用 `entry!` 快速构造 Entry: ```rust -// Features: ["extra_macros"] +// Features: ["extras"] @@@use mingling::{assert_member_id, unpack_chain_process}; @@@use mingling::macros::entry; diff --git a/docs/_zh_CN/pages/2-define-a-dispatcher.md b/docs/_zh_CN/pages/2-define-a-dispatcher.md index 0afd911..b238d9f 100644 --- a/docs/_zh_CN/pages/2-define-a-dispatcher.md +++ b/docs/_zh_CN/pages/2-define-a-dispatcher.md @@ -79,10 +79,10 @@ pub struct EntryGreet { ## 进阶:隐式声明 -以上是标准写法。如果你启用了 `extra_macros` 特性,还可以更简洁: +以上是标准写法。如果你启用了 `extras` 特性,还可以更简洁: ```rust -// Features: ["extra_macros"] +// Features: ["extras"] // 省略 CMDType 和 EntryType,名字自动推导 dispatcher!("greet"); // dispatcher!("greet", CMDGreet => EntryGreet); diff --git a/docs/_zh_CN/pages/6-argument-parse-picker.md b/docs/_zh_CN/pages/6-argument-parse-picker.md index f0609ed..462a912 100644 --- a/docs/_zh_CN/pages/6-argument-parse-picker.md +++ b/docs/_zh_CN/pages/6-argument-parse-picker.md @@ -138,7 +138,7 @@ fn handle_test_entry(prev: EntryTest) -> Next { 先来看一个简单示例 ```rust -// Features: ["parser", "extra_macros"] +// Features: ["parser", "extras"] @@@use mingling::macros::buffer; @@@use mingling::macros::route; @@@dispatcher!("greet", CMDGreet => EntryGreet); @@ -164,10 +164,10 @@ fn render_greet(result: ResultName) { 若使用 `pick_or_route`,写法会变得相对复杂:因为 `.unpack()` 不再直接返回参数,而是 `Result<Value, Route>`。 -不过 **Mingling** 的 `extra_macros` 特性提供了简化展开的宏 `route!`,它不复杂,只是省略了一部分样板代码: +不过 **Mingling** 的 `extras` 特性提供了简化展开的宏 `route!`,它不复杂,只是省略了一部分样板代码: ```rust -// Features: ["parser", "extra_macros"] +// Features: ["parser", "extras"] @@@ pack!(ErrorFail = ()); @@@ use mingling::macros::route; @@@ fn func() -> mingling::ChainProcess<ThisProgram> { @@ -181,7 +181,7 @@ let name = route!(pick_result); 它展开为: ```rust -// Features: ["parser", "extra_macros"] +// Features: ["parser", "extras"] @@@ pack!(ErrorFail = ()); @@@ fn func() -> mingling::ChainProcess<ThisProgram> { @@@ let args: Vec<String> = vec![]; @@ -223,7 +223,7 @@ fn handle_greet_entry(prev: EntryGreet) -> Next { 同样,你可以使用 `after_or_route` 来处理输入参数的格式错误 ```rust -// Features: ["parser", "extra_macros"] +// Features: ["parser", "extras"] @@@use mingling::macros::buffer; @@@use mingling::macros::route; @@@dispatcher!("greet", CMDGreet => EntryGreet); diff --git a/docs/_zh_CN/pages/8-setup-and-resources.md b/docs/_zh_CN/pages/8-setup-and-resources.md index d38e69d..9ed9894 100644 --- a/docs/_zh_CN/pages/8-setup-and-resources.md +++ b/docs/_zh_CN/pages/8-setup-and-resources.md @@ -8,7 +8,7 @@ ## 用 Setup 做初始化 ```rust -// Features: ["extra_macros"] +// Features: ["extras"] @@@use mingling::macros::program_setup; @@@use mingling::Program; #[program_setup] @@ -32,14 +32,14 @@ fn my_setup(program: &mut Program<ThisProgram>) { 在 `main` 里通过 `program.with_setup(...)` 注册即可使用。 > [!NOTE] -> `#[program_setup]` 需要 `extra_macros` 特性。没有此特性时,可以手动实现 `ProgramSetup` trait。 +> `#[program_setup]` 需要 `extras` 特性。没有此特性时,可以手动实现 `ProgramSetup` trait。 ## 提取全局参数 Setup 里最常用的操作就是提取全局参数。Mingling 提供了几个辅助方法: ```rust -// Features: ["extra_macros"] +// Features: ["extras"] @@@use mingling::macros::program_setup; @@@use mingling::Program; #[program_setup] diff --git a/docs/_zh_CN/pages/9-error-handling.md b/docs/_zh_CN/pages/9-error-handling.md index 4ce61ab..f5055b8 100644 --- a/docs/_zh_CN/pages/9-error-handling.md +++ b/docs/_zh_CN/pages/9-error-handling.md @@ -107,10 +107,10 @@ Error: name is required ## 关于 `pack_err!` -如果你启用了 `extra_macros`,还可以用 `pack_err!` 快速声明带有自动 `name` 字段的错误类型: +如果你启用了 `extras`,还可以用 `pack_err!` 快速声明带有自动 `name` 字段的错误类型: ```rust -// Features: ["extra_macros"] +// Features: ["extras"] pack_err!(ErrorNotFound); // 生成: struct ErrorNotFound { pub name: String } ``` diff --git a/docs/_zh_CN/pages/other/features.md b/docs/_zh_CN/pages/other/features.md index 8bd386c..2d65e47 100644 --- a/docs/_zh_CN/pages/other/features.md +++ b/docs/_zh_CN/pages/other/features.md @@ -3,6 +3,66 @@ <b>Mingling</b> 的所有特性一览 </p> +# 预设特性组 + +Mingling 提供了一系列**预设特性组**,方便用户按需组合启用特性。 + +## `mini` + +**启用特性:** `extras`、`picker` + +**定位:** 精简模式,适合小型 CLI 工具或需要快速起步的项目。仅包含最核心的便捷宏和参数解析能力。 + +## `advanced` + +**启用特性:** `extras`、`picker`、`repl`、`comp`、`dispatch_tree`、`structural_renderer` + +**定位:** 进阶模式,在 `mini` 的基础上加入了交互式 REPL 环境、代码补全、调度树加速以及基础的结构化输出能力,适合功能较完整的中型命令行应用。 + +## `full` + +**启用特性:** `extras`、`picker`、`repl`、`clap`、`comp`、`dispatch_tree`、`structural_renderer_full`、`pathf` + +**定位:** 完整模式,启用 Mingling 的全部核心功能。在 `advanced` 的基础上额外包含 clap 集成、完整的结构化渲染器(含所有序列化格式)以及实验性的路径分析器,适合大型、功能全面的命令行应用。 + +## `build_advanced` + +**启用特性:** `build`、`comp` + +**定位:** 构建期增强配置,用于在项目构建时生成补全脚本等构建辅助材料(`comp` 特性提供补全脚本生成能力)。 + +> [!NOTE] +> +> 此特性组为**构建依赖**专用,需配合 `advanced` 特性使用。请在 `Cargo.toml` 的 `[build-dependencies]` 中启用: + +```toml +[dependencies.mingling] +features = ["advanced"] + +[build-dependencies.mingling] +features = ["build_advanced"] +``` + +## `build_full` + +**启用特性:** `build`、`comp`、`pathf`、`dispatch_tree` + +**定位:** 完整的构建期配置,在 `build_advanced` 的基础上额外包含路径分析器(`pathf`)以自动解析类型模块路径,适合结构复杂、需要自动化构建期分析的项目。 + +> [!NOTE] +> +> 此特性组为**构建依赖**专用,需配合 `full` 特性使用。请在 `Cargo.toml` 的 `[build-dependencies]` 中启用: + +```toml +[dependencies.mingling] +features = ["full"] + +[build-dependencies.mingling] +features = ["build_full"] +``` + +# 特性详解 + ## 特性 `all_serde_fmt` **介绍:** @@ -83,7 +143,7 @@ build_comp_scripts("myprogram").unwrap(); 详见 [示例](https://mingling-rs.github.io/mingling/docs/example-viewer.html?name=example-dispatch-tree) -## 特性 `extra_macros` +## 特性 `extras` **介绍:** @@ -106,7 +166,7 @@ build_comp_scripts("myprogram").unwrap(); ### `empty_result!()` ```rust -// Features: ["extra_macros"] +// Features: ["extras"] pack!(StatePrev1 = ()); pack!(StatePrev2 = ()); @@ -134,7 +194,7 @@ fn handle_state_prev1(_p: StatePrev1) -> Next { ### `#[program_setup]` ```rust -// Features: ["extra_macros"] +// Features: ["extras"] use mingling::{macros::program_setup, Program}; fn main() { @@ -154,7 +214,7 @@ fn no_error_setup(program: &mut Program<ThisProgram>) { ### `entry!` ```rust -// Features: ["extra_macros"] +// Features: ["extras"] use mingling::macros::entry; pack!(EntryHello = Vec<String>); @@ -174,7 +234,7 @@ fn handle_hello(args: EntryHello) {} 类型名会直接作为枚举变体,与 `pack!` 或 `#[derive(Grouped)]` 一致。 ```rust -// Features: ["extra_macros"] +// Features: ["extras"] use mingling::macros::group; use std::num::ParseIntError; @@ -189,7 +249,7 @@ group!(std::num::ParseIntError); 可选择包裹一个内部类型以携带额外上下文。 ```rust -// Features: ["extra_macros"] +// Features: ["extras"] use std::path::PathBuf; // 简单形式——仅包含 name 字段: diff --git a/docs/dev/pages/issues/_the-mod-pathfinder.md b/docs/dev/pages/issues/_the-mod-pathfinder.md index 8869beb..92cdb5f 100644 --- a/docs/dev/pages/issues/_the-mod-pathfinder.md +++ b/docs/dev/pages/issues/_the-mod-pathfinder.md @@ -32,7 +32,7 @@ mod sub { } ``` -There are a few exceptions, such as the implicit Dispatcher provided by `extra_macros`, but these can be inferred from the node name: +There are a few exceptions, such as the implicit Dispatcher provided by `extras`, but these can be inferred from the node name: ```rust dispatcher!("remote.add"); // although the type is unknown, we can infer CMDRemoteAdd and EntryRemoteAdd diff --git a/docs/dev/pages/issues/the-command-macro.md b/docs/dev/pages/issues/the-command-macro.md index 2f4a80a..82d733c 100644 --- a/docs/dev/pages/issues/the-command-macro.md +++ b/docs/dev/pages/issues/the-command-macro.md @@ -16,7 +16,7 @@ For a long time, creating a command in Mingling required the following steps: dispatcher!("greet", CMDGreet => EntryGreet); ``` -Or use the implicit syntax provided by `extra_macros` (automatically deriving `CMDGreet` and `EntryGreet`): +Or use the implicit syntax provided by `extras` (automatically deriving `CMDGreet` and `EntryGreet`): ```rust dispatcher!("greet"); @@ -151,11 +151,11 @@ In Mingling, there is no concept called `Command` — all behavior is the result ## Enabling -This macro requires the `extra_macros` feature. Enable it in your `Cargo.toml`: +This macro requires the `extras` feature. Enable it in your `Cargo.toml`: ```toml [dependencies] -mingling = { version = "...", features = ["extra_macros"] } +mingling = { version = "...", features = ["extras"] } ``` ## Caveats diff --git a/docs/example-pages/examples.json b/docs/example-pages/examples.json index 349248e..bde9d35 100644 --- a/docs/example-pages/examples.json +++ b/docs/example-pages/examples.json @@ -84,7 +84,7 @@ "tags": [ "pathf", "dispatch_tree", - "extra_macros", + "extras", "build.rs" ], "files": [ @@ -230,7 +230,7 @@ "name": "Implicit Dispatcher", "icon": "🫥", "category": "dispatch", - "desc": "Shows the abbreviated `dispatcher!(\"cmd.path\")` syntax from `extra_macros` that auto-derives struct names from the command path.\n", + "desc": "Shows the abbreviated `dispatcher!(\"cmd.path\")` syntax from `extras` that auto-derives struct names from the command path.\n", "tags": [ "implicit" ], @@ -261,7 +261,7 @@ "desc": "Demonstrates how to use the `group!()` macro to convert an external type into a type recognizable by Mingling\n", "tags": [ "group!", - "extra_macros" + "extras" ], "files": [ "src/main.rs", @@ -276,7 +276,7 @@ "desc": "Demonstrates how to use the `pack_err!` macro to define error types with automatic `name` field (snake_case at compile time) and optional `info` field. Also shows `--json` serialization when `structural_renderer` is enabled.\n", "tags": [ "pack_err!", - "extra_macros", + "extras", "structural_renderer", "--json" ], @@ -354,7 +354,7 @@ "desc": "Demonstrates how to build a custom `ProgramSetup` with `#[program_setup]` for modular configuration of program behaviour.\n", "tags": [ "#[setup]", - "extra_macros" + "extras" ], "files": [ "src/main.rs", @@ -385,7 +385,7 @@ "desc": "Shows how to write unit tests for Chain and Renderer functions using the `entry!` macro and assertion helpers.\n", "tags": [ "testing", - "extra_macros" + "extras" ], "files": [ "src/main.rs", diff --git a/docs/pages/1-getting-started.md b/docs/pages/1-getting-started.md index 2f31d69..8c81100 100644 --- a/docs/pages/1-getting-started.md +++ b/docs/pages/1-getting-started.md @@ -19,7 +19,7 @@ features = [] ## Enable Features -**Mingling** has all features disabled by default and does **not** provide an all-in-one feature like `full`. +**Mingling** by default only enables `core` and `macros`; the rest need to be enabled as needed. Some features **directly affect the entire lifecycle behavior**, so you need to enable them as needed, e.g.: diff --git a/docs/pages/14-testing.md b/docs/pages/14-testing.md index 65fedc9..86171bf 100644 --- a/docs/pages/14-testing.md +++ b/docs/pages/14-testing.md @@ -70,10 +70,10 @@ What the three test macros do: ## Constructing Data with the entry! Macro -If `extra_macros` is enabled, you can use `entry!` to quickly construct an Entry: +If `extras` is enabled, you can use `entry!` to quickly construct an Entry: ```rust -// Features: ["extra_macros"] +// Features: ["extras"] @@@use mingling::{assert_member_id, unpack_chain_process}; @@@use mingling::macros::entry; diff --git a/docs/pages/2-define-a-dispatcher.md b/docs/pages/2-define-a-dispatcher.md index 804ad1b..1208e64 100644 --- a/docs/pages/2-define-a-dispatcher.md +++ b/docs/pages/2-define-a-dispatcher.md @@ -79,10 +79,10 @@ When the user types `greet Alice Bob` on the command line, `EntryGreet.inner` be ## Advanced: Implicit Declaration -The above is the standard syntax. If you enable the `extra_macros` feature, you can be more concise: +The above is the standard syntax. If you enable the `extras` feature, you can be more concise: ```rust -// Features: ["extra_macros"] +// Features: ["extras"] // Omit CMDType and EntryType, names are auto-derived dispatcher!("greet"); // dispatcher!("greet", CMDGreet => EntryGreet); diff --git a/docs/pages/6-argument-parse-picker.md b/docs/pages/6-argument-parse-picker.md index 01f1c37..d7d38af 100644 --- a/docs/pages/6-argument-parse-picker.md +++ b/docs/pages/6-argument-parse-picker.md @@ -138,7 +138,7 @@ As the saying goes: "never trust your users." To handle missing required params, Here's a simple example: ```rust -// Features: ["parser", "extra_macros"] +// Features: ["parser", "extras"] @@@use mingling::macros::buffer; @@@use mingling::macros::route; @@@dispatcher!("greet", CMDGreet => EntryGreet); @@ -164,10 +164,10 @@ fn render_greet(result: ResultName) { With `pick_or_route`, the code becomes more involved: `.unpack()` no longer returns the value directly, but `Result<Value, Route>`. -However, **Mingling**'s `extra_macros` feature provides the `route!` macro for simplified expansion. It's not complex — it just reduces boilerplate: +However, **Mingling**'s `extras` feature provides the `route!` macro for simplified expansion. It's not complex — it just reduces boilerplate: ```rust -// Features: ["parser", "extra_macros"] +// Features: ["parser", "extras"] @@@ pack!(ErrorFail = ()); @@@ use mingling::macros::route; @@@ fn func() -> mingling::ChainProcess<ThisProgram> { @@ -181,7 +181,7 @@ let name = route!(pick_result); It expands to: ```rust -// Features: ["parser", "extra_macros"] +// Features: ["parser", "extras"] @@@ pack!(ErrorFail = ()); @@@ fn func() -> mingling::ChainProcess<ThisProgram> { @@@ let args: Vec<String> = vec![]; @@ -223,7 +223,7 @@ fn handle_greet_entry(prev: EntryGreet) -> Next { Similarly, you can use `after_or_route` to handle input format errors: ```rust -// Features: ["parser", "extra_macros"] +// Features: ["parser", "extras"] @@@use mingling::macros::buffer; @@@use mingling::macros::route; @@@dispatcher!("greet", CMDGreet => EntryGreet); diff --git a/docs/pages/8-setup-and-resources.md b/docs/pages/8-setup-and-resources.md index 3858e99..12c7610 100644 --- a/docs/pages/8-setup-and-resources.md +++ b/docs/pages/8-setup-and-resources.md @@ -8,7 +8,7 @@ When a program needs to do some init work at startup—like parsing global args ## Initialize with Setup ```rust -// Features: ["extra_macros"] +// Features: ["extras"] @@@use mingling::macros::program_setup; @@@use mingling::Program; #[program_setup] @@ -32,14 +32,14 @@ A function annotated with `#[program_setup]` receives `&mut Program<ThisProgram> Register it in `main` via `program.with_setup(...)` to use it. > [!NOTE] -> `#[program_setup]` requires the `extra_macros` feature. Without it, you can manually implement the `ProgramSetup` trait. +> `#[program_setup]` requires the `extras` feature. Without it, you can manually implement the `ProgramSetup` trait. ## Extract Global Args The most common use of Setup is extracting global args. Mingling provides a few helper methods: ```rust -// Features: ["extra_macros"] +// Features: ["extras"] @@@use mingling::macros::program_setup; @@@use mingling::Program; #[program_setup] diff --git a/docs/pages/9-error-handling.md b/docs/pages/9-error-handling.md index f6e05e3..680328c 100644 --- a/docs/pages/9-error-handling.md +++ b/docs/pages/9-error-handling.md @@ -107,10 +107,10 @@ Error: name is required ## About `pack_err!` -If you've enabled `extra_macros`, you can use `pack_err!` to quickly declare an error type with an auto-generated `name` field: +If you've enabled `extras`, you can use `pack_err!` to quickly declare an error type with an auto-generated `name` field: ```rust -// Features: ["extra_macros"] +// Features: ["extras"] pack_err!(ErrorNotFound); // Generates: struct ErrorNotFound { pub name: String } ``` diff --git a/docs/pages/other/features.md b/docs/pages/other/features.md index 7994d4c..55b6cc8 100644 --- a/docs/pages/other/features.md +++ b/docs/pages/other/features.md @@ -3,6 +3,67 @@ <b>Mingling</b>'s complete feature list </p> +# Preset Feature Groups + +Mingling provides a set of **preset feature groups** that make it easy to enable features in whatever combination you need. + +## `mini` + +**Enables features:** `extras`, `picker` + +**Positioning:** Minimal mode, suitable for small CLI tools or projects that need to get started quickly. Includes only the most essential convenience macros and argument parsing capabilities. + +## `advanced` + +**Enables features:** `extras`, `picker`, `repl`, `comp`, `dispatch_tree`, `structural_renderer` + +**Positioning:** Advanced mode, builds on `mini` by adding an interactive REPL environment, code completion, dispatch tree acceleration, and basic structured output capabilities. Suitable for medium-sized command-line applications with a fuller feature set. + +## `full` + +**Enables features:** `extras`, `picker`, `repl`, `clap`, `comp`, `dispatch_tree`, `structural_renderer_full`, `pathf` + +**Positioning:** Full mode, enables all of Mingling's core functionality. In addition to `advanced`, it includes clap integration, the full structural renderer (with all serialization formats), and the experimental path analyzer. Suitable for large, feature-complete command-line applications. + +## `build_advanced` + +**Enables features:** `build`, `comp` + +**Positioning:** Build-time enhanced configuration, used to generate build helpers such as completion scripts at build time (the `comp` feature provides completion script generation). + +> [!NOTE] +> +> This feature group is intended for **build dependencies** only and must be used alongside the `advanced` feature. Enable it in the `[build-dependencies]` section of `Cargo.toml`: + +```toml +[dependencies.mingling] +features = ["advanced"] + +[build-dependencies.mingling] +features = ["build_advanced"] +``` + +## `build_full` + +**Enables features:** `build`, `comp`, `pathf`, `dispatch_tree` + +**Positioning:** Full build-time configuration, extends `build_advanced` with the path analyzer (`pathf`) to automatically resolve type module paths, suitable for projects with complex structures that require automated build-time analysis. + +> [!NOTE] +> +> This feature group is intended for **build dependencies** only and must be used alongside the `full` feature. Enable it in the `[build-dependencies]` section of `Cargo.toml`: + +```toml +[dependencies.mingling] +features = ["full"] + +[build-dependencies.mingling] +features = ["build_full"] +``` + +# Feature Details + + ## Feature `all_serde_fmt` **Description:** @@ -83,7 +144,7 @@ When enabled, Mingling **at compile time** hard-codes the subcommand structure a See [example](https://mingling-rs.github.io/mingling/docs/example-viewer.html?name=example-dispatch-tree) -## Feature `extra_macros` +## Feature `extras` **Description:** @@ -106,7 +167,7 @@ For example, allows the shorthand form `dispatcher!("greet")`, which auto-genera ### `empty_result!()` ```rust -// Features: ["extra_macros"] +// Features: ["extras"] pack!(StatePrev1 = ()); pack!(StatePrev2 = ()); @@ -134,7 +195,7 @@ fn handle_state_prev1(_p: StatePrev1) -> Next { ### `#[program_setup]` ```rust -// Features: ["extra_macros"] +// Features: ["extras"] use mingling::{macros::program_setup, Program}; fn main() { @@ -154,7 +215,7 @@ fn no_error_setup(program: &mut Program<ThisProgram>) { ### `entry!` ```rust -// Features: ["extra_macros"] +// Features: ["extras"] use mingling::macros::entry; pack!(EntryHello = Vec<String>); @@ -174,7 +235,7 @@ Registers an external type as a member of the program group without modifying it The type's simple name is used as the enum variant, just like `pack!` or `#[derive(Grouped)]`. ```rust -// Features: ["extra_macros"] +// Features: ["extras"] use mingling::macros::group; use std::num::ParseIntError; @@ -189,7 +250,7 @@ Creates an error struct with an automatic `name: String` field set to the snake_ of the struct name. Optionally wraps an inner type for additional context. ```rust -// Features: ["extra_macros"] +// Features: ["extras"] use std::path::PathBuf; // Simple form — only a name field: |
