aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
author魏曹先生 <1992414357@qq.com>2026-06-26 06:27:16 +0800
committer魏曹先生 <1992414357@qq.com>2026-06-26 06:41:01 +0800
commitd1a74ce57e5be72436376a829e9c7e1e7c1c561b (patch)
tree6ac923671fc09f1c47b613869d793ed3e04b91db /docs
parente735671acb3a81e1b7e334e56b9ef3963ba0c2fc (diff)
refactor(general_renderer): rename to structural_renderer
Diffstat (limited to 'docs')
-rw-r--r--docs/_zh_CN/pages/other/features.md10
-rw-r--r--docs/_zh_CN/pages/other/naming_rule.md2
-rw-r--r--docs/example-pages/examples.json36
-rw-r--r--docs/pages/other/features.md16
-rw-r--r--docs/pages/other/naming_rule.md2
5 files changed, 33 insertions, 33 deletions
diff --git a/docs/_zh_CN/pages/other/features.md b/docs/_zh_CN/pages/other/features.md
index 558720c..cadffec 100644
--- a/docs/_zh_CN/pages/other/features.md
+++ b/docs/_zh_CN/pages/other/features.md
@@ -7,7 +7,7 @@
**介绍:**
-为 `general_renderer` 启用所有序列化格式(JSON、RON、TOML、YAML)的 serde 格式化支持。
+为 `structural_renderer` 启用所有序列化格式(JSON、RON、TOML、YAML)的 serde 格式化支持。
开启此特性将自动启用 `json_serde_fmt`、`ron_serde_fmt`、`toml_serde_fmt`、`yaml_serde_fmt` 四个子特性。
@@ -208,7 +208,7 @@ pack_err!(ErrorNotDir = PathBuf);
</details>
-## 特性 `general_renderer`
+## 特性 `structural_renderer`
**介绍:**
@@ -216,15 +216,15 @@ pack_err!(ErrorNotDir = PathBuf);
开启后,用户可以通过 `--json` 或 `--yaml` 等标志获取结构化输出。
-详见 [示例](https://mingling-rs.github.io/mingling/docs/example-viewer.html?name=example-general-renderer)
+详见 [示例](https://mingling-rs.github.io/mingling/docs/example-viewer.html?name=example-structural-renderer)
-## 特性 `general_renderer_empty`
+## 特性 `structural_renderer_empty`
**介绍:**
启用通用渲染器的空实现版本,适用于不需要实际渲染功能的场景。此特性不启用任何 serde 格式化后端。
-## 特性 `general_renderer_full`
+## 特性 `structural_renderer_full`
**介绍:**
diff --git a/docs/_zh_CN/pages/other/naming_rule.md b/docs/_zh_CN/pages/other/naming_rule.md
index 18ebf3f..264cffd 100644
--- a/docs/_zh_CN/pages/other/naming_rule.md
+++ b/docs/_zh_CN/pages/other/naming_rule.md
@@ -36,7 +36,7 @@ Res + 名称
| 示例 | 说明 |
| ---------------------- | ---------------------------------------------- |
| `BasicSetup` | 基础初始化(`--quiet`、`--help`、`--confirm`) |
-| `GeneralRendererSetup` | 通用渲染器初始化(`--json`、`--yaml` 等) |
+| `StructuralRendererSetup` | 通用渲染器初始化(`--json`、`--yaml` 等) |
### 分发器
diff --git a/docs/example-pages/examples.json b/docs/example-pages/examples.json
index 4d7c494..f3484f3 100644
--- a/docs/example-pages/examples.json
+++ b/docs/example-pages/examples.json
@@ -148,22 +148,6 @@
]
},
{
- "id": "example-general-renderer",
- "name": "General Renderer",
- "icon": "📤",
- "category": "output",
- "desc": "Demonstrates how to render structured output in JSON or YAML using `GeneralRendererSetup` and the `general_renderer` feature.\n",
- "tags": [
- "general_renderer",
- "--json",
- "--yaml"
- ],
- "files": [
- "src/main.rs",
- "Cargo.toml"
- ]
- },
- {
"id": "example-help",
"name": "Help",
"icon": "💡",
@@ -239,11 +223,11 @@
"name": "Pack an Error",
"icon": "🛑",
"category": "macros",
- "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 `general_renderer` is enabled.\n",
+ "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",
- "general_renderer",
+ "structural_renderer",
"--json"
],
"files": [
@@ -310,6 +294,22 @@
]
},
{
+ "id": "example-structural-renderer",
+ "name": "structural renderer",
+ "icon": "📤",
+ "category": "output",
+ "desc": "Demonstrates how to render structured output in JSON or YAML using `StructuralRendererSetup` and the `structural_renderer` feature.\n",
+ "tags": [
+ "structural_renderer",
+ "--json",
+ "--yaml"
+ ],
+ "files": [
+ "src/main.rs",
+ "Cargo.toml"
+ ]
+ },
+ {
"id": "example-unit-test",
"name": "Unit Test",
"icon": "🧪",
diff --git a/docs/pages/other/features.md b/docs/pages/other/features.md
index 5ee0497..ea5fc93 100644
--- a/docs/pages/other/features.md
+++ b/docs/pages/other/features.md
@@ -7,7 +7,7 @@
**Description:**
-Enables serde formatting support for all serialization formats (JSON, RON, TOML, YAML) in `general_renderer`.
+Enables serde formatting support for all serialization formats (JSON, RON, TOML, YAML) in `structural_renderer`.
Enabling this feature will automatically enable the four sub-features: `json_serde_fmt`, `ron_serde_fmt`, `toml_serde_fmt`, `yaml_serde_fmt`.
@@ -208,27 +208,27 @@ pack_err!(ErrorNotDir = PathBuf);
</details>
-## Feature `general_renderer`
+## Feature `structural_renderer`
**Description:**
-Enables the general renderer, providing basic content rendering capabilities. Enabling this feature will automatically enable `json_serde_fmt`.
+Enables the structural renderer, providing basic content rendering capabilities. Enabling this feature will automatically enable `json_serde_fmt`.
When enabled, users can get structured output via flags like `--json` or `--yaml`.
-See [example](https://mingling-rs.github.io/mingling/docs/example-viewer.html?name=example-general-renderer)
+See [example](https://mingling-rs.github.io/mingling/docs/example-viewer.html?name=example-structural-renderer)
-## Feature `general_renderer_empty`
+## Feature `structural_renderer_empty`
**Description:**
-Enables an empty implementation of the general renderer, suitable for scenarios where no actual rendering is needed. This feature does not enable any serde formatting backend.
+Enables an empty implementation of the structural renderer, suitable for scenarios where no actual rendering is needed. This feature does not enable any serde formatting backend.
-## Feature `general_renderer_full`
+## Feature `structural_renderer_full`
**Description:**
-Enables the full implementation of the general renderer, including all rendering capabilities and serialization format support. Enabling this feature will automatically enable `all_serde_fmt`.
+Enables the full implementation of the structural renderer, including all rendering capabilities and serialization format support. Enabling this feature will automatically enable `all_serde_fmt`.
## Feature `json_serde_fmt`
diff --git a/docs/pages/other/naming_rule.md b/docs/pages/other/naming_rule.md
index 9443481..4f4efe8 100644
--- a/docs/pages/other/naming_rule.md
+++ b/docs/pages/other/naming_rule.md
@@ -36,7 +36,7 @@ Name + Setup
| Example | Description |
| ---------------------- | ---------------------------------------------------------- |
| `BasicSetup` | Basic initialization (`--quiet`, `--help`, `--confirm`) |
-| `GeneralRendererSetup` | General renderer initialization (`--json`, `--yaml`, etc.) |
+| `StructuralRendererSetup` | structural renderer initialization (`--json`, `--yaml`, etc.) |
### Dispatcher