aboutsummaryrefslogtreecommitdiff
path: root/docs/pages/3-features/2-general-renderer.md
diff options
context:
space:
mode:
author魏曹先生 <1992414357@qq.com>2026-04-28 22:39:59 +0800
committer魏曹先生 <1992414357@qq.com>2026-04-28 22:39:59 +0800
commit85ee549f68449bc70a7f1271a93ad26a8207ee40 (patch)
treebfb0b678d0f96c06b196417fd612a9cad2baf7fe /docs/pages/3-features/2-general-renderer.md
parent5bf4209bd138faf76e3bd316fdfa128a08f2bb2e (diff)
Rebuild and rewrite the documentation site infrastructure
Diffstat (limited to 'docs/pages/3-features/2-general-renderer.md')
-rw-r--r--docs/pages/3-features/2-general-renderer.md75
1 files changed, 0 insertions, 75 deletions
diff --git a/docs/pages/3-features/2-general-renderer.md b/docs/pages/3-features/2-general-renderer.md
deleted file mode 100644
index c3b81a2..0000000
--- a/docs/pages/3-features/2-general-renderer.md
+++ /dev/null
@@ -1,75 +0,0 @@
-<h1 align="center">General Renderer</h1>
-<p align="center">
- Mingling's Features
-</p>
-
----
-
-## Enable Feature
-
-`general_renderer` is a feature provided by **Mingling**. You can enable it in the following way:
-
-```toml
-[dependencies]
-mingling = {
- version = "...",
- features = ["general_renderer"]
-}
-```
-
-## Setup
-
-`general_renderer` requires you to implement the `serde::Serialize` trait for **all** structs, so your project needs to include `serde`
-
-```toml
-[dependencies]
-serde = {
- version = "1",
- features = ["derive"]
-}
-```
-
-For types wrapped with the `pack!` macro, `serde::Serialize` will be automatically implemented
-
-```rust
-pack!(YourInfo = ()); // Auto derive `serde::Serialize`
-```
-
-For types using the derive macro `Groupped`, you need to manually implement `serde::Serialize`
-
-```rust
-#[derive(Default, Groupped, Serialize)]
-struct YourInfo {
- name: String,
- age: i32,
-}
-```
-
-> [!Tip]
-> If there are types that do not implement `serde::Serialize`, compilation will fail.
-
-## Import GeneralRendererSetup
-
-`general_renderer` provides a Setup type called `GeneralRendererSetup`.
-
-After importing it into your program,
-user inputs like `--json`, `--yaml`, `--toml`, `--ron`, `--json-pretty`, and `--ron-pretty` will be automatically recognized.
-
-During the **rendering phase**, instead of the **default renderer**, the serialized content will be displayed to the terminal.
-
-```rust
-fn main() {
- let mut program = ThisProgram::new();
-
- // Add General Renderer
- program.with_setup(GeneralRendererSetup);
-
- // Add Dispatchers
- program.with_dispatchers((
- // Your dispatchers
- ));
-
- // Execute
- program.exec();
-}
-```